C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-55
LARGESYM
LARGESYM
The LARGESYM pragma directs the TNS C compiler and Cfront to generate all the 
symbols for a given compilation to a single symbols data block containing information 
used by the Inspect debugger to display information about a variable or to display its 
contents. You must also specify the SYMBOLS pragma when you specify LARGESYM.
The pragma default settings are:
Usage Guidelines
•
The LARGESYM pragma can be entered on the compiler RUN command line or in 
the source text. For OSS, LARGESYM must be entered in the source file.
•
Use the LARGESYM pragma only in a file that contains a #include directive for a 
header file that contains embedded conditional compilations that might cause a 
structure definition to vary from module to module. If the LARGESYM directive is 
used in all compilations, the symbol region might be extremely large. The default 
action for the compiler is to generate an optimized symbol region.
•
The native C and C++ compilers do not support this pragma; the compilers 
generate complete symbols information.
Example
Assume the header file defh contains:
struct worddef {
#ifdef MACHINE_WORDLEN_32
 int intvar1;
 int intvar2;
#else
 long intvar;
#endif };
Further, assume that module1c includes the header file defh and that the structure 
worddef contains members intvar1 and intvar2. Also assume that module2c 
includes the header file defh and contains a single member intvar. If the LARGESYM 
pragma is not used, the compiler creates a single data block that contains only one of 
LARGESYM
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler Not set Not set
G-series TNS c89 utility Not set Not set
TNS/R native C and C++ compilers  N.A. N.A.
Native c89 utility N.A. N.A.
TNS/E native C and C++ compilers  N.A. N.A.










