#define SET(y) warning.y = state;
#define OPT(x, y) OPTX(x) SET(y)
OPT("char-subscripts", char_subscripts)
+ OPT("empty-statement", empty_statement)
OPT("error", s_are_errors)
OPT("fatal-errors", fatal_errors)
OPT("format", check_format)
warning_t warning = {
.char_subscripts = true,
.check_format = true,
+ .empty_statement = true,
.fatal_errors = false,
.implicit_function_declaration = true,
.implicit_int = true,
bool declaration_after_statement:1; /* Warn when a declaration is found after a statement in a block */
bool deprecated_declarations:1; /* Warn about uses of functions, variables and types marked as deprecated by using the 'deprecated' attribute */
bool div_by_zero:1; /* Warn about compile-time integer division by zero */
+#endif
+ bool empty_statement:1; /* Warn about empty statements, i.e. lone ';' */
+#if 0 // TODO
bool endif_labels:1; /* Warn whenever an '#else' or an '#endif' are followed by text */
#endif
bool fatal_errors:1; /* First error stops the compilation */