Consistently use PUSH_PARENT()/POP_PARENT().
[cparser] / main.c
diff --git a/main.c b/main.c
index 6a0852b..bc6a233 100644 (file)
--- a/main.c
+++ b/main.c
@@ -633,9 +633,10 @@ static void print_help_parser(void)
 
 static void print_help_warnings(void)
 {
-       put_help("-w",                       "disable all warnings");
-       put_help("-Wno-trigraphs",           "warn if input contains trigraphs");
-       put_help("-Wundef",                  "Warn if an undefined macro is used in an #if");
+       put_help("-f[no-]diagnostics-show-option", "Show the switch, which controls a warning, after each warning");
+       put_help("-w",                             "disable all warnings");
+       put_help("-Wno-trigraphs",                 "warn if input contains trigraphs");
+       put_help("-Wundef",                        "Warn if an undefined macro is used in an #if");
        print_warning_opt_help();
 }
 
@@ -683,7 +684,7 @@ static void print_help_codegeneration(void)
        put_help("-ffast-math",              "same as fp-fast (gcc compatibility)");
        puts("");
        puts("\tMost of these options can be used with a no- prefix to disable them");
-       puts("\ti.e. -fno-signed-char");
+       puts("\te.g. -fno-signed-char");
 }
 
 static void print_help_linker(void)
@@ -980,7 +981,7 @@ int main(int argc, char **argv)
                        } else if (SINGLE_OPTION('v')) {
                                verbose = 1;
                        } else if (SINGLE_OPTION('w')) {
-                               memset(&warning, 0, sizeof(warning));
+                               disable_all_warnings();
                        } else if (option[0] == 'x') {
                                const char *opt;
                                GET_ARG_AFTER(opt, "-x");
@@ -1068,6 +1069,8 @@ int main(int argc, char **argv)
 
                                        if (streq(opt, "builtins")) {
                                                use_builtins = truth_value;
+                                       } else if (streq(opt, "diagnostics-show-option")) {
+                                               diagnostics_show_option = truth_value;
                                        } else if (streq(opt, "dollars-in-identifiers")) {
                                                allow_dollar_in_symbol = truth_value;
                                        } else if (streq(opt, "omit-frame-pointer")) {