warn_undefmacro

Controls the detection of undefined macros in #if/#elif conditionals.

Syntax
  #pragma warn_undefmacro on | off | reset  
Remarks

The following listing provides an example.

Listing: Example of Undefined Macro
#if UNDEFINEDMACRO == 4 // WARNING: undefined macro  

                        // 'UNDEFINEDMACRO' used in

                        // #if/#elif conditional

Use this pragma to detect the use of undefined macros (especially expressions) where the default value 0 is used.

Note: A warning is only issued when a macro is evaluated. A short-circuited " &&" or " ||" test or unevaluated " ?:" will not produce a warning.

This pragma corresponds to the Undefined Macro in #if setting in the Language panel. To check this setting, use __option (warn_undefmacro ), described in Checking Pragma Settings. By default, this pragma is off.