This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[incremental] Patch: FYI: un-break gcc -E
- From: Tom Tromey <tromey at redhat dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 18 Sep 2007 09:03:42 -0600
- Subject: [incremental] Patch: FYI: un-break gcc -E
- Reply-to: Tom Tromey <tromey at redhat dot com>
I'm checking this in on the incremental-compiler branch.
I broke 'gcc -E' a while back and this un-breaks it.
Tom
ChangeLog:
2007-09-18 Tom Tromey <tromey@redhat.com>
* c-opts.c (c_common_post_options): Call cpp_read_main_file when
preprocessing only.
Index: c-opts.c
===================================================================
--- c-opts.c (revision 128001)
+++ c-opts.c (working copy)
@@ -1232,7 +1232,11 @@
immediately. */
errorcount += cpp_errors (parse_in);
- *pfilename = in_fnames[0]; /* FIXME: not quite as nice ... ? */
+ if (flag_preprocess_only)
+ *pfilename = this_input_filename = cpp_read_main_file (parse_in,
+ in_fnames[0]);
+ else
+ *pfilename = in_fnames[0]; /* FIXME: not quite as nice ... ? */
if (flag_working_directory
&& flag_preprocess_only && !flag_no_line_commands)