5 void set_warning_opt(const char *const opt)
11 if (s[0] == 'n' && s[1] == 'o' && s[2] == '-') {
17 #define OPTX(x) else if (strcmp(s, x) == 0)
18 #define SET(y) warning.y = state;
19 #define OPT(x, y) OPTX(x) SET(y)
20 OPT("char-subscripts", char_subscripts)
21 OPT("empty-statement", empty_statement)
22 OPT("error", s_are_errors)
23 OPT("fatal-errors", fatal_errors)
24 OPT("float-equal", float_equal)
25 OPT("format", check_format)
27 SET(implicit_function_declaration)
30 OPT("implicit-function-declaration", implicit_function_declaration)
31 OPT("implicit-int", implicit_int)
33 OPT("missing-declarations", missing_declarations)
34 OPT("missing-prototypes", missing_prototypes)
35 OPT("redundant-decls", redundant_decls)
36 OPT("strict-prototypes", strict_prototypes)
37 OPT("switch-default", switch_default)
38 OPT("unknown-pragmas", unknown_pragmas)
39 OPT("unused-label", unused_label)
40 OPT("unused-parameter", unused_parameter)
41 OPT("unused-variable", unused_variable)
51 OPT("unused-value", unused_value)
56 fprintf(stderr, "warning: ignoring unknown option -W%s\n", opt);
61 .char_subscripts = true,
63 .empty_statement = false,
64 .fatal_errors = false,
66 .implicit_function_declaration = true,
69 .missing_declarations = false,
70 .missing_prototypes = false,
71 .redundant_decls = true,
72 .s_are_errors = false,
73 .strict_prototypes = true,
74 .switch_default = false,
75 .unknown_pragmas = true,
76 .unused_label = false,
77 .unused_parameter = false,
78 .unused_variable = false,