-U
Purpose
Undefines a macro defined by the compiler or by the -D compiler option.
Syntax
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; see the configuration file for your system for more information.
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
keywordNone.
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:
ibm-clang myprogram.c -U__unix
