update preprocessor tests
[cparser] / main.c
diff --git a/main.c b/main.c
index d27edf0..f0be72c 100644 (file)
--- a/main.c
+++ b/main.c
@@ -111,7 +111,6 @@ bool               freestanding              = false;
 static machine_triple_t *target_machine;
 static const char       *target_triple;
 static int               verbose;
-static bool              use_builtins;
 static struct obstack    cppflags_obst;
 static struct obstack    ldflags_obst;
 static struct obstack    asflags_obst;
@@ -179,17 +178,10 @@ static void get_output_name(char *buf, size_t buflen, const char *inputname,
                panic("filename too long");
 }
 
-#include "gen_builtins.h"
-
 static translation_unit_t *do_parsing(FILE *const in, const char *const input_name)
 {
        start_parsing();
 
-       if (use_builtins) {
-               lexer_open_buffer(builtins, sizeof(builtins)-1, "<builtin>");
-               parse();
-       }
-
        lexer_open_stream(in, input_name);
        parse();
 
@@ -638,6 +630,7 @@ 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("-Winit-self",                    "Ignored (gcc compatibility)");
        print_warning_opt_help();
 }
 
@@ -1058,14 +1051,14 @@ int main(int argc, char **argv)
                                        }
                                } else if (strstart(orig_opt, "message-length=")) {
                                        /* ignore: would only affect error message format */
-                               } else if (strstart(orig_opt, "fast-math") ||
-                                          strstart(orig_opt, "fp-fast")) {
+                               } else if (streq(orig_opt, "fast-math") ||
+                                          streq(orig_opt, "fp-fast")) {
                                        firm_fp_model = fp_model_fast;
-                               } else if (strstart(orig_opt, "fp-precise")) {
+                               } else if (streq(orig_opt, "fp-precise")) {
                                        firm_fp_model = fp_model_precise;
-                               } else if (strstart(orig_opt, "fp-strict")) {
+                               } else if (streq(orig_opt, "fp-strict")) {
                                        firm_fp_model = fp_model_strict;
-                               } else if (streq(opt, "help")) {
+                               } else if (streq(orig_opt, "help")) {
                                        fprintf(stderr, "warning: -fhelp is deprecated\n");
                                        help |= HELP_OPTIMIZATION;
                                } else {
@@ -1077,9 +1070,7 @@ int main(int argc, char **argv)
                                                opt += 3;
                                        }
 
-                                       if (streq(opt, "builtins")) {
-                                               use_builtins = truth_value;
-                                       } else if (streq(opt, "diagnostics-show-option")) {
+                                       if (streq(opt, "diagnostics-show-option")) {
                                                diagnostics_show_option = truth_value;
                                        } else if (streq(opt, "dollars-in-identifiers")) {
                                                allow_dollar_in_symbol = truth_value;
@@ -1163,6 +1154,8 @@ int main(int argc, char **argv)
                                } else if (streq(option + 1, "no-trigraphs")
                                                        || streq(option + 1, "undef")) {
                                        add_flag(&cppflags_obst, "%s", arg);
+                               } else if (streq(option+1, "init-self")) {
+                                       /* ignored (gcc compatibility) */
                                } else {
                                        set_warning_opt(&option[1]);
                                }