Undefines the identifier name defined by the compiler or by the -Dname option.


Read syntax diagramSkip visual syntax diagram>>- -U--name---------------------------------------------------><


The -Uname 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 -Dname option.

The identifier name can also be undefined in your source program using the #undef preprocessor directive.

The -Uname option has a higher precedence than the -Dname option.


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

Related information