Technical data

Implementation-defined Behavior [10]
This chapter describes compiler behavior that is defined by the implementation
according to the C and/or C++ standards. The standards require that the
behavior of each particular implementation be documented.
10.1 Implementation-defined Behavior
The C and C++ standards define implementation-defined behavior as
behavior, for a correct program construct and correct data, that depends on the
characteristics of the implementation. The behavior of the Cray Standard C/C++
compilers for these cases is summarized in this section.
10.1.1 Messages
All diagnostic messages issued by the compilers are reported through the
UNICOS message system. For information on messages issued by the compilers
and for information about the UNICOS message system, see Appendix C,
page 173.
10.1.2 Environment
When argc and argv are used as parameters to the main function, the array
members argv[0] through argv[argc-1] contain pointers to strings that are
set by the command shell. The shell sets these arguments to the list of words on
the command line used to invoke the compiler (the argument list). For further
information on how the words in the argument list are formed, refer to the
documentation on the shell in which you are running. For information on
UNICOS shells, see the sh(1), csh(1), or ksh(1) man pages.
A third parameter, char **envp, provides access to environment variables.
The value of the parameter is a pointer to the first element of an array of
null-terminated strings, that matches the output of the env(1) command. The
array of pointers is terminated by a null pointer.
The compiler does not distinguish between interactive devices and other,
noninteractive devices. The library, however, may determine that stdin,
stdout, and stderr (cin, cout, and cerr in Cray Standard C++) refer to
interactive devices and buffer them accordingly. For further information, see the
description of I/O in the UNICOS System Libraries Reference Manual.
S217936 141