This section describes the implementation-defined characteristics of preprocessing directives. It corresponds to section ``F.3.13 Preprocessing Directives'' in the ANSI document.
The value of a single-character character constant in a constant expression that controls conditional inclusion matches the value of the same character constant in the execution character set. This may be a negative value.
To locate bracketed, includable source files, the preprocessor searches through any paths specified on the command line by the -I option and then through the default path or paths, normally an API-specific hierarchy such as /usr/include/ansi, and /usr/include.
To locate quoted, includable source files, the preprocessor looks in the directory containing the file being compiled, then searches through any paths specified on the command line by the -I option, and then searches through the default path or paths, normally an API-specific hierarchy such as /usr/include/ansi, and /usr/include. If the file is not found, the preprocessor reparses the the ``#include string newline'' as if it was a ``< >'' delimited file and repeats the search as described in the previous section.
Filenames can be any legal UNIX filename including a full specification of paths.
Both source and execution sets include the full ASCII character sets. The delimited sequence is mapped directly into the external filename.
The behavior of each recognized #pragma directive in C is listed below:
#pragma asm [full_optimization|partial_optimization] asm_func
specifies full or partial optimization for asm_func, which must have an entry in the symbol table and be an asm.
#pragma comment (compiler)
which is silently ignored,
#pragma comment (comment_type, "string")where comment_type must be one of exestr, user or lib.
When comment_type is exestr,
the string, string, is put in a comment section of the object file.
This is equivalent to the previous non-ANSI construction
When comment_type is either user or lib,
the #pragma statement is silently ignored.
#pragma ident "version"
which is identical in function to the previous non-ANSI construction
#pragma int_to_unsigned identifier
which identifies identifier as a function whose type was int in previous releases of the compilation system, but whose type is unsigned int in this release. The declaration for identifier must precede the #pragma.
unsigned int strlen(const char); #pragma int_to_unsigned strlen#pragma int_to_unsigned makes it possible for the compiler to identify expressions in which the function's changed type may affect the evaluation of the expression. In the -Xk or -Xt mode, the compiler treats the function as if it were declared to return int rather than unsigned int.
#pragma pack (n)
which controls the layout of structure offsets. n is a number, 1, 2, or 4, that specifies the strictest alignment desired for any structure member. If n is omitted, the alignment reverts to the default, which may have been set by the -Zp option to cc.
A value of 4 is the default.
#pragma weak identifier
which identifies identifier as a weak global symbol,
#pragma weak identifier = identifier2
which identifies identifier as a weak global symbol whose value is the same as identifier2. identifier should otherwise be undefined. For more information on weak global symbols, see ``Multiply defined symbols''.
The macros __DATE__ and __TIME__
return the date and time of translation respectively.
The date and time are always available to the macros.