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]

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


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)


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