this_input_filename patch introduced bug

Neil Booth neil@daikokuya.co.uk
Sun Jul 27 20:46:00 GMT 2003


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.



More information about the Gcc-bugs mailing list