HP 3000 Manuals

Pragmas [ HP C/iX Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Reference Manual

Pragmas 

You may include the following pragmas within a source file, but you may
not use them within a function.  A pragma is valid from the point that it
is included to the end of the source file or until another pragma changes
its status.

#pragma OPTIMIZE {ON }
                 {OFF}
Turns all optimizations ON or OFF, depending on which option you use.

#pragma OPT_LEVEL {1}
                  {2}
Sets optimization level to local when you specify OPT_LEVEL 1, or sets
optimization level to global and local when you specify OPT_LEVEL 2.

     #pragma NO_SIDE_EFFECTS functionname1,...,functionnamen 

States that functionname and all the functions that functionname calls
will not modify any of a program's local or global variables.  This
information allows better optimizations to be performed when optimization
level 2 has been specified.

     #pragma ALLOCS_NEW_MEMORY functionname1,...,functionnamen 

States that the function functionname returns a pointer to "new" memory,
such as heap space, that it allocates or a routine that it calls
allocates.  This information allows better optimizations to be performed
when optimization level 2 has been specified.

     #pragma COPYRIGHT "string" 

Places a copyright notice using string as the company name into the
relocatable object module or the program file.

     #pragma COPYRIGHT_DATE "string" 

Specifies a date string to be used in a copyright notice appearing in an
object module.

     #pragma VERSIONID "string" 

Specifies a version number to be associated with a particular piece of
software.  The string is placed into the object file produced when the
software is compiled.

     #pragma PAGE

Causes a page break in the listing and begins a new page.

     #pragma LINES linenum 

Sets the number of lines per page to linenum. 

     #pragma WIDTH pagewidth 

Sets the width of the page to pagewidth. 

     #pragma TITLE "string" 

Makes string the title of the listing.

     #pragma SUBTITLE "string" 

Makes string the subtitle of the listing.

#pragma LIST {ON }
             {OFF}
Turns listing functionality ON or OFF. The default is ON.

#pragma AUTOPAGE {ON }
                 {OFF}
When ON, causes a page break in the listing after each function
definition.  The default is OFF.

     #pragma LOCALITY "string" 

Specifies a name to be associated with the code that is written to a
Relocatable Object Module.  All code following the locality pragma will
be associated with the name given until the end of the current source
file or until another locality pragma is encountered.  Locality of code
is at the function level.  Without the locality pragma, the name CODE is
associated with the generated code.

For more information on optimizer pragmas, refer to chapter 7.  For more
information on the listing pragmas, refer to chapter 11.[REV BEG]

#pragma HP_ALIGN {MPE_16}
                 {POP   }
The MPE_16 option directs the HP C/iX compiler to set the alignment of
int, float, and double in structures and unions to be aligned according
to the MPE/V alignment scheme.  This option also sets the alignment of
structures and unions to start and end on at least a half-word boundary.
The HP_ALIGN MPE_16 pragma facilitates reading TurboImage databases and
MPE/V based binary files on MPE/iX systems.

The POP option turns off the HP_ALIGN pragma and alignment reverts to
word (32-bit) alignment.[REV END]

[REV BEG] For more information on
data alignment, refer to chapter 9, "HP C/iX Implementation Topics."[REV
END]



MPE/iX 5.0 Documentation