C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)
A HP C Implementation-Defined Behavior
Implementation-Defined Behavior of Native C
The ISO standard for C allows implementations to vary in specific instances. This subsection
describes the implementation-defined behavior of native C. This subsection corresponds to Annex
G.3 of the ISO C standard or Appendix F of the ANSI C standard.
G.3.1 Translation
The form of the diagnostic messages displayed by the native compilers is such that the source line
is first displayed, followed by a line that indicates the location, and, finally, a line of the form: file
name, line: diagnostic-type: diagnostic message. For example:
FILE *fp;)
^
“/usr/people/bj/test/c1.c”, line 2, error(114): identifier “FILE” is undefined
G.3.2 Environment
The arguments to main() are treated:
DescriptionArgument
the name of the executable fileargv [0]
command line parametersargv [1] ... argv [argc-1]
a null pointerargv [argc]
An interactive device is a video display terminal.
G.3.3 Identifiers
An identifier without external linkage has a maximum of 230 significant initial characters.
An identifier with external linkage has a total of 127 significant characters.
Case distinctions are significant in an identifier with external linkage.
G.3.4 Characters
The shift states used for the encoding of multibyte characters are:
• The number of bits in a character in the execution character set is 8, but only the lower 7 are
significant.
• The mapping of characters of the source character set to members of the execution character
set is one to one.
• There are no invalid characters or escape sequences in the basic execution character set.
• The value of an integer character constant that contains more than one character or a wide
character that contains more than one multibyte character, for character constants with 2 to
4 characters, is:
2 characters "ab"
'a' * 256 + (unsigned) 'b'
3 characters "abc"
'a' * 65536 + (unsigned) 'b' * 256 + (unsigned) 'c'
4 characters "abcd"
'a' * 16777216 + (unsigned) 'b' * 65536+ (unsigned) 'c' * 256 + (unsigned) 'd'
396 HP C Implementation-Defined Behavior