[incremental] Patch: FYI: un-break gcc -E

Tom Tromey tromey@redhat.com
Tue Sep 18 15:55:00 GMT 2007


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)



More information about the Gcc-patches mailing list