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

Table Of Contents
C and C++ Extensions
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
2-2
Declarations
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.
Storage Class Specifier
The _lowmem and export-attribute storage-class specifiers are HP extensions.
typedef, extern, static, auto, and register
are described in the ISO/ANSI C standard.
_lowmem
specifies that arrays and structures in the declaration are to be stored in the user
data space instead of the extended segment (only for TNS C and C++).
Consequently, _lowmem is useful only when compiling for the large-memory model
declaration-specifiers:
storage-class-specifier [ declaration-specifiers ]
type-specifier [ declaration-specifiers ]
type-qualifier [ declaration-specifiers ]
attribute-specifier [ declaration-specifiers ]
storage-class-specifier is one of:
typedef
extern
static
auto
register
export-attribute
_lowmem