Sun Studio 12: C++ User's Guide

A.2.94 –Uname

Deletes initial definition of the preprocessor symbol name.

This option removes any initial definition of the macro symbol name created by -D on the command line including those implicitly placed there by the CC driver. This option has no effect on any other predefined macros, nor on macro definitions in source files.

To see the -D options that are placed on the command line by the CC driver, add the -dryrun option to your command line.

A.2.94.1 Examples

The following command undefines the predefined symbol __sun. Preprocessor statements in foo.cc such as #ifdef(__sun) will sense that the symbol is undefined.


example% CC -U__sun foo.cc

Interactions

You can specify multiple -U options on the command line.

All -U options are processed after any -D options that are present. That is, if the same name is specified for both -D and -U on the command line, name is undefined, regardless of the order the options appear.

See also

-D