From: Neil Booth Date: Sat, 15 Mar 2003 15:02:16 +0000 (+0000) Subject: * fix-header.c (read_scan_file): Read main file before handling -D. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=151c68c36f3c591d162f7aab74d38ee7384f9f3d;p=gcc.git * fix-header.c (read_scan_file): Read main file before handling -D. From-SVN: r64404 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 732055712cc..b42a3921b80 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2003-03-15 Neil Booth + + * fix-header.c (read_scan_file): Read main file before handling -D. + 2003-03-15 Roger Sayle * c-cppbuiltin.c (builtin_define_with_value_n): Fix whitespace. diff --git a/gcc/fix-header.c b/gcc/fix-header.c index 36e1d7cbedb..f58df6e7f75 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -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, ""); cpp_init_builtins (scan_in);