-U
Category
Pragma equivalent
None.
Purpose
Undefines a macro defined by the compiler or by the -D compiler option.
Defaults
Many macros are predefined by the compiler; see Compiler predefined macros for those that can be undefined (that is, are not protected). The compiler configuration file also uses the -D option to predefine several macro names for specific invocation commands; for details, see the configuration file for your system.
Parameters
- name
- The macro you want to undefine.
Usage
The -U option is not equivalent to the #undef preprocessor directive. It cannot undefine names defined in the source by the #define preprocessor directive. It can only undefine names defined by the compiler or by the -D option.
The -Uname option has a higher precedence than the -Dname option.
Predefined macros
None.
Examples
Assume that your operating system
defines the name __unix, but you do not want your
compilation to enter code segments conditional on that name being
defined, compile myprogram.c so that the definition
of the name __unix is nullified by entering:
xlc myprogram.c -U__unix