warn_undefmacro

Controls the detection of undefined macros in #if and #elif directives.

Syntax
#pragma warn_undefmacro on | off | reset
  
Remarks

Example of Undefined Macro provides an example.

Listing 1. Example of Undefined Macro
#if BADMACRO == 4 /* WARNING: undefined macro. */

Use this pragma to detect the use of undefined macros (especially expressions) where the default value 0 is used. To suppress this warning message, check if defined first.

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

By default, this pragma is off .

Related information
extended_errorcheck
maxerrorcount
message
showmessagenumber
show_error_filestack
suppress_warnings
sym
unused
warning
warning_errors
warn_any_ptr_int_conv
warn_emptydecl
warn_extracomma
warn_filenamecaps
warn_filenamecaps_system
warn_hiddenlocals
warn_illpragma
warn_illtokenpasting
warn_illunionmembers
warn_impl_f2i_conv
warn_impl_i2f_conv
warn_impl_s2u_conv
warn_implicitconv
warn_largeargs
warn_missingreturn
warn_no_side_effect
warn_padding
warn_pch_portability
warn_possunwant
warn_ptr_int_conv
warn_resultnotused
warn_uninitializedvar
warn_unusedarg
warn_unusedvar