OSDN Git Service

Add ability to force lexed tokens' source_locations.
[pf3gnuchains/gcc-fork.git] / gcc / c-family / c-opts.c
index 3227f7b..49ff80d 100644 (file)
@@ -1306,12 +1306,17 @@ c_finish_options (void)
     {
       size_t i;
 
-      cb_file_change (parse_in,
-                     linemap_add (line_table, LC_RENAME, 0,
-                                  _("<built-in>"), 0));
+      {
+       /* Make sure all of the builtins about to be declared have
+         BUILTINS_LOCATION has their source_location.  */
+       source_location builtins_loc = BUILTINS_LOCATION;
+       cpp_force_token_locations (parse_in, &builtins_loc);
 
-      cpp_init_builtins (parse_in, flag_hosted);
-      c_cpp_builtins (parse_in);
+       cpp_init_builtins (parse_in, flag_hosted);
+       c_cpp_builtins (parse_in);
+
+       cpp_stop_forcing_token_locations (parse_in);
+      }
 
       /* We're about to send user input to cpplib, so make it warn for
         things that we previously (when we sent it internal definitions)