Use strstart() instead of strncmp().
[cparser] / main.c
diff --git a/main.c b/main.c
index f4a6f03..85964f0 100644 (file)
--- a/main.c
+++ b/main.c
@@ -695,6 +695,7 @@ static void print_help_linker(void)
 {
        put_help("-l LIBRARY",               "");
        put_help("-L PATH",                  "");
+       put_help("-s",                       "Do not produce symbol table and relocation information");
        put_help("-shared",                  "Produce a shared library");
        put_help("-static",                  "Produce statically linked binary");
        put_help("-Wl,OPTION",               "Pass option directly to linker");
@@ -950,7 +951,7 @@ static void init_types_and_adjust(void)
                set_typeprops_type(&props[ATOMIC_TYPE_LONGLONG], type_long_long);
 
        ir_type *type_unsigned_long_long = be_params->type_unsigned_long_long;
-       if (type_long_long != NULL)
+       if (type_unsigned_long_long != NULL)
                set_typeprops_type(&props[ATOMIC_TYPE_ULONGLONG], type_unsigned_long_long);
 
        /* operating system ABI specifics */
@@ -1139,6 +1140,8 @@ int main(int argc, char **argv)
                                mode = CompileAssemble;
                        } else if (SINGLE_OPTION('E')) {
                                mode = PreprocessOnly;
+                       } else if (SINGLE_OPTION('s')) {
+                               add_flag(&ldflags_obst, "-s");
                        } else if (SINGLE_OPTION('S')) {
                                mode = Compile;
                        } else if (option[0] == 'O') {
@@ -1166,6 +1169,7 @@ int main(int argc, char **argv)
                        } else if (SINGLE_OPTION('v')) {
                                verbose = 1;
                        } else if (SINGLE_OPTION('w')) {
+                               add_flag(&cppflags_obst, "-w");
                                disable_all_warnings();
                        } else if (option[0] == 'x') {
                                const char *opt;
@@ -1351,7 +1355,7 @@ int main(int argc, char **argv)
                                                        || streq(option + 1, "endif-labels")) {
                                        add_flag(&cppflags_obst, "%s", arg);
                                } else if (streq(option+1, "init-self")) {
-                                       /* ignored (asme as gcc does) */
+                                       /* ignored (same as gcc does) */
                                } else if (streq(option+1, "format-y2k")
                                           || streq(option+1, "format-security")
                                           || streq(option+1, "old-style-declaration")