]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* fix-header.c (read_scan_file): Defer switch processing.
authorNeil Booth <neil@daikokuya.co.uk>
Thu, 3 Apr 2003 22:01:21 +0000 (22:01 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Thu, 3 Apr 2003 22:01:21 +0000 (22:01 +0000)
From-SVN: r65216

gcc/ChangeLog
gcc/fix-header.c

index 0760413f14f59a067d853a7ffbc3aca4d53116b6..616b1a04ccfa05d9990b876b6fdb4a3ffe99af65 100644 (file)
@@ -1,3 +1,7 @@
+2003-04-03  Neil Booth  <neil@daikokuya.co.uk>
+
+       * fix-header.c (read_scan_file): Defer switch processing.
+
 2003-04-03  Matt Austern  <austern@apple.com>
 
        * cpppch.c (reset_ht): Remove.
index 423cd57fb8fe6d7552db068ca0310a7998f094e4..033019eb84934dc4b434e3af983754cf3c5eb05e 100644 (file)
@@ -635,6 +635,11 @@ read_scan_file (in_fname, argc, argv)
   if (! cpp_read_main_file (scan_in, in_fname))
     exit (FATAL_EXIT_CODE);
 
+  cpp_change_file (scan_in, LC_RENAME, "<built-in>");
+  cpp_init_builtins (scan_in);
+  cpp_change_file (scan_in, LC_RENAME, in_fname);
+
+  /* Process switches after builtins so -D can override them.  */
   for (i = 0; i < argc; i += strings_processed)
     {
       strings_processed = 0;
@@ -675,10 +680,6 @@ read_scan_file (in_fname, argc, argv)
                           true /* stdinc */, false /* cxx_stdinc */,
                           false /* verbose */);
 
-  cpp_change_file (scan_in, LC_RENAME, "<built-in>");
-  cpp_init_builtins (scan_in);
-  cpp_change_file (scan_in, LC_RENAME, in_fname);
-
   /* We are scanning a system header, so mark it as such.  */
   cpp_make_system_header (scan_in, 1, 0);