C/C++ Programmer's Guide (G06.25+)
C and C++ Extensions
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
2-7
Declarations
};
// Error to selectively export/import members of an exported/imported class
class export$ C4 {
public :
int I;
import$ int foo (void) {return I;} // Error
export$ static int J; // Error
};
int C4::J = 1; //Definition for exported static data member.
//Error to export & import members from a class in a single compilation unit
class C5 {
public :
int I;
export$ int foo (void) {return I;} // Exported member function
import$ static int J; // Error
};
Type Specifier
For the TNS compilers, the _cc_status type specifier is a HP extension. For the
native compilers, _cc_status is a typedef in the tal.h header file, and you must
include this header file to use _cc_status.
void, char, short, int, long, float, double, signed, unsigned, and
bool
are as described in the ISO/ANSI C standard. Additional information concerning
these predefined data types is given later in this section and in Appendix A, HP C
Implementation-Defined Behavior. Note that the bool type became available at
the D45 release, but it is available only with native C++ using the VERSION2
directive.
_cc_status
indicates that a procedure does not return a value but does set a condition code.
Note. Do not write C functions or TAL procedures that set a condition code and use
_cc_status because that is an outdated programming practice. Guardian system procedures
retain this interface for reasons of compatibility only.
type-specifier
void | char | short | int | long | float | double|
signed | unsigned | bool | _cc_status |
struct-or-union-specifier | enum-specifier | typedef-name