HP 3000 Manuals

Special Preprocessor Considerations [ HP C/iX Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Reference Manual

Special Preprocessor Considerations 

The HP C/iX compiler first executes a preprocessing phase during which
all preprocessor directives (lines beginning with #) are interpreted and
acted upon.  See chapter 7 for detailed information about preprocessing.
This section describes features unique to the preprocessing phase on
MPE/iX systems.

Preprocessor Output File 

During the preprocessing phase, an output file is created for use by the
compiler.  Although the file is created with a record size and file limit
that is sufficiently large for most applications, it is possible for a
source program to expand beyond the default file limit and record size.
You can use two HP C/iX compiler options, +F and +C, to overcome this
problem.

Typically, the file limit may be exceeded if you compile a very large
source file or if you use many #include directives.  The compiler issues
an error message indicating that the file limit of the preprocessor
output file was exceeded.  To resolve this error, you must recompile the
source file using the +F compiler option to specify a larger file limit.
Any unused file space is returned when the output file is closed so you
should specify a sufficiently large file limit.

A source file might have a line that expands beyond the default record
size if it contains a large macro, a number of macros, macros that
include other macros, or any combination of these conditions.  This
problem is more difficult to detect because many lines can exceed the
default size without causing an error.  It is only when a token, such as
an identifier, is split across two records in the output file that an
error occurs.  The error occurs on the line that contains the expanded
macro.  To resolve this type of error, recompile using the +C option to
specify a larger record size, or reduce the size of the macro.  The
default record size is 512 bytes.

Predefined Macros 

The preprocessor on MPE/iX has one predefined macro, mpexl, to aid the
identification and isolation of system dependent code.  This macro
behaves as if the preprocessor directive #define mpexl 1 is included at
the top of the file.  The mpexl macro is typically used with the #ifdef
statement.

Example.   

     #ifdef mpexl
        MPE/iX specific code ...
     #endif



MPE/iX 5.0 Documentation