case ';':
if (!strict_mode) {
- warningf(WARN_OTHER, HERE, "stray ';' outside of function");
+ warningf(WARN_STRAY_SEMICOLON, HERE, "stray ';' outside of function");
next_token();
return;
}
[WARN_SHADOW] = { WARN_STATE_NONE, "shadow", },
[WARN_SHADOW_LOCAL] = { WARN_STATE_NONE, "shadow-local", },
[WARN_SIGN_COMPARE] = { WARN_STATE_NONE, "sign-compare", },
+ [WARN_STRAY_SEMICOLON] = { WARN_STATE_ON, "stray-semicolon", },
[WARN_STRICT_PROTOTYPES] = { WARN_STATE_ON, "strict-prototypes" },
[WARN_SWITCH_DEFAULT] = { WARN_STATE_NONE, "switch-default", },
[WARN_SWITCH_ENUM] = { WARN_STATE_NONE, "switch-enum", },
WARN_SHADOW, /**< Warn whenever a local variable shadows another local variable, parameter or global variable or whenever a built-in function is shadowed */
WARN_SHADOW_LOCAL,
WARN_SIGN_COMPARE, /**< Warn when a comparison between signed and unsigned values could produce an incorrect result when the signed value is converted to unsigned */
+ WARN_STRAY_SEMICOLON, /**< Warn about stray semicolons outside of functions */
#if 0 // TODO
WARN_STRICT_ALIASING, /**< Warn about code which might break the strict aliasing rules that the compiler is using for optimization. */
#endif