mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
diagnostics: use grammar_file instead of current_file
Currently there are two globals denoting the input file: grammar_file is the one from the command line, and current_file which might change because of #line. Use only the former. * src/complain.c (error_message): here. * tests/diagnostics.at: Adjust.
This commit is contained in:
@@ -425,7 +425,7 @@ error_message (const location *loc, int *indent, warnings flags,
|
||||
if (loc)
|
||||
pos += location_print (*loc, stderr);
|
||||
else
|
||||
pos += fprintf (stderr, "%s", current_file ? current_file : program_name);
|
||||
pos += fprintf (stderr, "%s", grammar_file ? grammar_file : program_name);
|
||||
pos += fprintf (stderr, ": ");
|
||||
|
||||
if (indent)
|
||||
|
||||
Reference in New Issue
Block a user