The following are keywords and cannot be used as identifiers:
Table C-1 XDR Keywords
|
|
|
|
|
|
|
cas |
default |
|
|
|
|
|
|
|
|
|
switch |
|
|
Only unsigned constants may be used as size specifications for arrays. If an identifier is used, it must have been declared previously as an unsigned constant in a const
definition.
Constant and type identifiers within the scope of a specification are in the same name space and must be declared uniquely within this scope.
Similarly, variable names must be unique within the scope of struct
and union
declarations. Nested struct
and union
declarations create new scopes.
The discriminant of a union
must be of a type that evaluates to an integer. That is, int
, unsigned int,
bool
, an enum
type, or any typedef
that evaluates to one of these. Also, the case values must be legal discriminant values. Finally, a case value may not be specified more than once within the scope of a union
declaration.