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

TNS C Compiler Messages
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
20-38
Types of Compiler Messages
222
All the members of a structure have to reside in the data space or the code space;
mixing is not possible.
224
The declarations for a pointer modified with the _cspace attribute are different. For
example:
#pragma csaddr
_cspace const struct S_tag { int i,j,k; } s = { 10, 20, 30 };
/* Declared as 6 bytes */
func1 (_cspace const char * );
foo()
{
_cpace const char *q; /* Declared as 1 byte */
q = (const char *) &s;
foo1 ( q );
/* Only one byte copied and passed, */
} /* but points at a six-byte structure */
225
A local variable and function parameter have the same name. For example:
int main(int argc, char *argv[])
{
int argc; /* This line causes the warning */
}
226
Enumerated types must be compatible with the type int. Thus, the value assigned to
an enumerated type cannot exceed the range of integer for a given memory model. For
example, an int in the large-memory model is 16 bits signed, so an enumerated value
cannot exceed 32767.
structure cannot contain members in code and data space at
the same time
number of bytes passed relies on previous declaration only
local variable name variable-name same as function parameter
invalid value for enum literal literal-name