C/C++ Programmer's Guide (G06.25+)

C and C++ Extensions
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
2-14
Declarations
Considerations for both the native and TNS compilers:
The _resident attribute is effective only for function definitions. It is
ignored if it is given for a function declaration and its corresponding
function definition is not in the same compilation unit.
For C++, if you define a local class within a _resident function, then all
member functions of this local class are implicitly declared to be
_resident.
_variable
directs the compiler to treat all formal parameters of the function as though
they were optional, even if some parameters are required by your code.
Considerations for only the native compilers:
_extensible and _variable are treated the same; _variable is a
synonym for _extensible.
Considerations for only the TNS compilers:
A function with no prototype declaration or definition under pragma
OLDCALLS cannot be _extensible.
Considerations for both the native and TNS compilers:
_extensible and _variable attributes cannot be specified for the same
function.
C-style variable argument lists (...) are not allowed.
A _variable attribute cannot be specified for a function that passes a
structure by value.
Returning structures by value is not allowed.
In C++ the following guidelines apply:
°
_variable functions can neither be overloaded nor have default
parameters.
°
_variable cannot be specified on global function templates, that is,
function templates that are not members of a class.
°
_variable cannot be specified on template member functions, that is,
the member functions of a template class.
°
_variable cannot be used on class member functions of any class.