This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH PING^2 for 3.4 "save-temps still produces different .s and .o"


> This is OK both for 3.4 and for mainline.

@@ -1462,12 +1468,16 @@
   if (include_cursor == deferred_count)
     {
       include_cursor++;
-      /* Restore the line map from <command line>.  */
-      if (! cpp_opts->preprocessed)
-	cpp_change_file (parse_in, LC_LEAVE, NULL);
       /* -Wunused-macros should only warn about macros defined hereafter.  
*/
       cpp_opts->warn_unused_macros = warn_unused_macros;
-      cpp_push_main_file (parse_in);
+      /* Restore the line map from <command line>.  */
+      if (! cpp_opts->preprocessed)
+	cpp_change_file (parse_in, LC_RENAME, main_input_filename);
+
+      /* 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.  */
+      cpp_get_line_maps (parse_in)->trace_includes
+	= cpp_opts->print_include_names;
     }
 }


This hunk is wrong because of:

   cpplib.h:extern const struct line_maps *cpp_get_line_maps (cpp_reader *);

and is flagged as such by the Sun ONE Studio 8 compiler:

   "../src/gcc/c-opts.c", line 1479: left operand must be modifiable lvalue

causing a bootstrap failure on the 3.4 branch.

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]