summaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-03 07:24:28 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-03 07:24:28 +0000
commit407f684461e489200ddbe6284e9ad2fcb3cf99c8 (patch)
treed8066b3d70eba76b7afa85a3aaf00eec2e0eab24 /gcc/c-opts.c
parentdca5287f83c35516a7e23d0af353ab2b6eb6fba0 (diff)
downloadgcc-407f684461e489200ddbe6284e9ad2fcb3cf99c8.tar.gz
* c-opts.c (needValue): Do cpp_find_main_file before processing
any imacros flags, so pfile->main_file is set for the latter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73212 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r--gcc/c-opts.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index 4473eaf49d3..bbabe891b66 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -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;
}