C/C++ Programmer's Guide (G06.25+)
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
2-1
2 C and C++ Extensions
•
Keywords on page 2-1
•
Declarations on page 2-2, including the following:
°
Storage Class Specifier on page 2-2
°
Type Specifier on page 2-7
°
Type Qualifier on page 2-9
°
Attribute Specifier on page 2-10
•
Pointer Modifiers on page 2-15
•
Operators on page 2-18
•
Data Types on page 2-20
This section describes the language extensions to the ISO/ANSI C standard that are
supported by the HP native C and C++ compilers, the TNS C compiler, and the TNS
C++ preprocessor.
Keywords
A keyword is a word symbol that has a special predefined syntactic or semantic
meaning in a programming language. Table 2-1 lists the reserved keywords that HP
has added as extensions to the C and C++ languages. The table notes whether there
are differences between using the keyword in the native or TNS environment.
Native C and C++ treat these HP extensions as keywords only if the EXTENSIONS
pragma is in effect. This feature allows you to choose to compile a program so that
standards conformance is enforced. This feature also ensures the acceptance of a
standard-conforming program that might happen to use one of these keywords as an
Table 2-1. Extensions to Reserved Keywords
Keywords With Same
Function in Both Native
and TNS
Keywords Allowed in Both
Native and TNS But With
No Effect in Native
Keywords Applicable Only
in TNS
_alias _baddr _cc_status
_arg_present _cobol
_bitlength _cspace
_c _far
_extensible _fortran
_optional _lowmem
_resident _near
_tal _pascal
_variable _procaddr
_waddr