This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH PING^2 for 3.4 "save-temps still produces different .s and .o"
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Per Bothner <per at bothner dot com>,gcc-patches at gcc dot gnu dot org
- Date: Sun, 8 Feb 2004 08:02:29 +0100
- Subject: Re: PATCH PING^2 for 3.4 "save-temps still produces different .s and .o"
- References: <40214849.3000900@bothner.com> <87znbyljsy.fsf@egil.codesourcery.com>
> 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