* fix-header.c (read_scan_file): Read main file before handling -D.
authorNeil Booth <neil@daikokuya.co.uk>
Sat, 15 Mar 2003 15:02:16 +0000 (15:02 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sat, 15 Mar 2003 15:02:16 +0000 (15:02 +0000)
From-SVN: r64404

gcc/ChangeLog
gcc/fix-header.c

index 732055712cc8fd429117865a7e32b513f666bcca..b42a3921b80de2f818f8f7dcff6de233dd69481b 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
+
+       * fix-header.c (read_scan_file): Read main file before handling -D.
+
 2003-03-15  Roger Sayle  <roger@eyesopen.com>
 
        * c-cppbuiltin.c (builtin_define_with_value_n): Fix whitespace.
index 36e1d7cbedb0acb752cf1e4a5e22b6285e908366..f58df6e7f759a753c5ff380c2ba479b0749de2eb 100644 (file)
@@ -632,6 +632,9 @@ read_scan_file (in_fname, argc, argv)
   options->inhibit_warnings = 1;
   options->inhibit_errors = 1;
 
+  if (! cpp_read_main_file (scan_in, in_fname, NULL))
+    exit (FATAL_EXIT_CODE);
+
   for (i = 0; i < argc; i += strings_processed)
     {
       strings_processed = 0;
@@ -669,8 +672,6 @@ read_scan_file (in_fname, argc, argv)
   register_include_chains (scan_in, NULL /* sysroot */, NULL /* iprefix */,
                           true /* stdinc */, false /* cxx_stdinc */,
                           false /* verbose */);
-  if (! cpp_read_main_file (scan_in, in_fname, NULL))
-    exit (FATAL_EXIT_CODE);
 
   cpp_rename_file (scan_in, "<built-in>");
   cpp_init_builtins (scan_in);