c-opts.c (needValue): Do cpp_find_main_file before processing any imacros flags...
authorPer Bothner <per@bothner.com>
Mon, 3 Nov 2003 07:24:28 +0000 (23:24 -0800)
committerPer Bothner <bothner@gcc.gnu.org>
Mon, 3 Nov 2003 07:24:28 +0000 (23:24 -0800)
* c-opts.c (needValue):  Do cpp_find_main_file before processing
any imacros flags, so pfile->main_file is set for the latter.

From-SVN: r73212

gcc/ChangeLog
gcc/c-opts.c

index 09c59c1546a8127dd59d63e40a56252dfd2b9190..928acd5f671dcbfc89f756209dc8e22a9b9ae9de 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-02  Per Bothner  <per@bothner.com>
+
+       * c-opts.c (needValue):  Do cpp_find_main_file before processing
+       any imacros flags, so pfile->main_file is set for the latter.
+
 2003-11-03  Andreas Jaeger  <aj@suse.de>
            Zack Weinberg  <zack@codesourcery.com>
 
index 4473eaf49d33e84280bee3aa8be746c505099ea0..bbabe891b665f9372b1ddd816a81e567cde7c642 100644 (file)
@@ -1392,6 +1392,10 @@ add_prefixed_path (const char *suffix, size_t chain)
 static bool
 finish_options (const char *tif)
 {
+  this_input_filename = tif;
+  if (! cpp_find_main_file (parse_in, this_input_filename))
+    return false;
+
   if (!cpp_opts->preprocessed)
     {
       size_t i;
@@ -1441,9 +1445,6 @@ finish_options (const char *tif)
     }
 
   include_cursor = 0;
-  this_input_filename = tif;
-  if (! cpp_find_main_file (parse_in, this_input_filename))
-    return false;
   push_command_line_include ();
   return true;
 }