# U

Undefines any definition currently in effect for the specified macro.

## Syntax

Linux: | -U name

Windows: | /U name

## Arguments

name | Is the name of the macro to be undefined.

## Default

OFF | Macro definitions are in effect until they are undefined.

## Description

This option undefines any definition currently in effect for the specified macro. It is equivalent to an #undef preprocessing directive.

On Windows systems, use the /u option to undefine all previously defined preprocessor values.

## IDE Equivalent

Visual Studio: Preprocessor > Undefine Preprocessor Definitions

Eclipse: Preprocessor > Undefine Preprocessor Definitions

## Alternate Options

None

## Example

To undefine a macro, enter the following command:

On Windows* systems:

    icx /Uia64 prog1.cpp   ! specific to C++

    dpcpp-cl /Uia64 prog1.cpp   ! specific to DPC++

On Linux* systems:

    icpx -Uia64 prog1.cpp   ! specific to C++

    dpcpp -Uia64 prog1.cpp   ! specific to DPC++

If you attempt to undefine an ANSI C macro, the compiler will emit an error:

    invalid macro undefinition: <name of macro>

Parent topic: Preprocessor Options