warn_extracomma

Controls the recognition of superfluous commas in enumerations.

Syntax
  #pragma warn_extracomma on | off | reset   
Remarks

If you enable this pragma, the compiler issues a warning message when it encounters a trailing comma in enumerations. For example, the following listing is acceptable source code but generates a warning message when you enable this setting.

Listing: Warning about extra commas
#pragma warn_extracomma on 
enum { mouse, cat, dog, }; 
/* WARNING: compiler expects an identifier after final comma. */ 

The compiler ignores terminating commas in enumerations when compiling source code that conforms to the ISO/IEC 9899-1999 ("C99") standard.

This pragma corresponds to the Extra Commas setting in the CodeWarrior IDE's C/C++ Warnings settings panel. By default, this pragma is disabled.