warn_emptydecl

Controls the recognition of declarations without variables.

Syntax
#pragma warn_emptydecl on | off | reset
  
Remarks

If you enable this pragma, the compiler displays a warning message when it encounters a declaration with no variables.

Listing 1. Examples of empty declarations in C and C++
#pragma warn_emptydecl on
int ; /* WARNING: empty variable declaration. */
int i; /* OK */
  
long j;; /* WARNING */
long j; /* OK */
Listing 2. Example of empty declaration in C++
#pragma warn_emptydecl on
extern "C" {
}; /* WARNING */

By default, this pragma is disabled.

Related information
extended_errorcheck
maxerrorcount
message
showmessagenumber
show_error_filestack
suppress_warnings
sym
unused
warning
warning_errors
warn_any_ptr_int_conv
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_undefmacro
warn_uninitializedvar
warn_unusedarg
warn_unusedvar