C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

2 C and C++ Extensions
This chapter 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 5 lists the reserved keywords that HP has added as extensions to
the C and C++ languages. Table 5 notes whether there are differences between using the keyword
in the native or TNS environment.
Table 5 Extensions to Reserved Keywords
Keywords Applicable Only in TNSKeywords Allowed in Both Native and
TNS But With No Effect in Native
Keywords With Same Function in Both
Native and TNS
_cc_status_baddr_alias
_cobol_arg_present
_cspace_bitlength
_far_c
_fortran_extensible
_lowmem_optional
_near_resident
_pascal_tal
_procaddr_variable
_waddr
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 identifier. Enforcing standards conformance is the
default setting. To disable it, specify the EXTENSIONS pragma.
TNS C and C++ always treat these HP extensions as reserved keywords. There is no way to disable
this behavior. This feature might cause some strictly conforming program to fail to compile.
Declarations
This subsection lists all the extensions HP has made to the declaration-specifier syntax
defined in the ISO/ANSI C standard. These syntax extensions also apply to C++, because the
rules for C are a subset of the rules for C++. In some cases, C++ imposes additional usage
considerations.
The storage-class-specifier, type-specifier, and type-qualifier are defined in
the ISO/ANSI C standard. Any extensions to these specifiers are described in this subsection. The
attribute-specifier is a P extension and is described later in this subsection.
declaration-specifiers:
storage-class-specifier [ declaration-specifiers ]
type-specifier [ declaration-specifiers ]
type-qualifier [ declaration-specifiers ]
attribute-specifier [ declaration-specifiers ]
Keywords 49