This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
this_input_filename patch introduced bug
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Geoffrey Keating <gkeating at apple dot com>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 27 Jul 2003 21:46:38 +0100
- Subject: this_input_filename patch introduced bug
Geoff,
Your this_input_filename patch introduced a bug when
preprocessing from stdin:
bash-2.05b$ ./cc1 -E -quiet
foo bar
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "" <--- file name lost here
foo bar
Can you fix this please? c-opts.c updates main_input_filename, and
you haven't caught that fact. You need to fix something around this line:
/* NOTE: we use in_fname here, not the one supplied. */
*pfilename = cpp_read_main_file (parse_in, in_fnames[0]);
Thanks,
Neil.