OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / c-opts.c
index 44adae4..16710b6 100644 (file)
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "options.h"
 #include "mkdeps.h"
 #include "target.h"
+#include "tm_p.h"
 
 #ifndef DOLLARS_IN_IDENTIFIERS
 # define DOLLARS_IN_IDENTIFIERS true
@@ -217,7 +218,7 @@ c_common_init_options (unsigned int argc, const char **argv)
     }
 
   parse_in = cpp_create_reader (c_dialect_cxx () ? CLK_GNUCXX: CLK_GNUC89,
-                               ident_hash, &line_table);
+                               ident_hash, line_table);
 
   cpp_opts = cpp_get_options (parse_in);
   cpp_opts->dollars_in_ident = DOLLARS_IN_IDENTIFIERS;
@@ -399,8 +400,6 @@ c_common_handle_option (size_t scode, const char *arg, int value)
       warn_parentheses = value;
       warn_return_type = value;
       warn_sequence_point = value;     /* Was C only.  */
-      if (c_dialect_cxx ())
-       warn_sign_compare = value;
       warn_switch = value;
       set_Wstrict_aliasing (value);
       warn_address = value;
@@ -424,17 +423,14 @@ c_common_handle_option (size_t scode, const char *arg, int value)
       else
        {
          /* C++-specific warnings.  */
+          warn_sign_compare = value;
          warn_reorder = value;
-         warn_nontemplate_friend = value;
           warn_cxx0x_compat = value;
-          if (value > 0)
-            warn_write_strings = true;
        }
 
       cpp_opts->warn_trigraphs = value;
       cpp_opts->warn_comments = value;
       cpp_opts->warn_num_sign_change = value;
-      cpp_opts->warn_multichar = value;        /* Was C++ only.  */
 
       if (warn_pointer_sign == -1)
        warn_pointer_sign = 1;
@@ -1484,7 +1480,7 @@ finish_options (void)
       size_t i;
 
       cb_file_change (parse_in,
-                     linemap_add (&line_table, LC_RENAME, 0,
+                     linemap_add (line_table, LC_RENAME, 0,
                                   _("<built-in>"), 0));
 
       cpp_init_builtins (parse_in, flag_hosted);
@@ -1502,7 +1498,7 @@ finish_options (void)
       cpp_opts->warn_dollars = (cpp_opts->pedantic && !cpp_opts->c99);
 
       cb_file_change (parse_in,
-                     linemap_add (&line_table, LC_RENAME, 0,
+                     linemap_add (line_table, LC_RENAME, 0,
                                   _("<command-line>"), 0));
 
       for (i = 0; i < deferred_count; i++)
@@ -1567,7 +1563,7 @@ push_command_line_include (void)
 
       /* Set this here so the client can change the option if it wishes,
         and after stacking the main file so we don't trace the main file.  */
-      line_table.trace_includes = cpp_opts->print_include_names;
+      line_table->trace_includes = cpp_opts->print_include_names;
     }
 }