An included file should start at line 1.

The preprocessor was incorrectly setting the line when starting
an include file to the line it was called from instead of 1.
This would give incorrect line numbers for errors/warnings in
the included file.
This commit is contained in:
Cary R 2008-07-28 20:55:47 -07:00 committed by Stephen Williams
parent 1a41ac3145
commit 3191b3efcb
1 changed files with 1 additions and 1 deletions

View File

@ -1472,7 +1472,7 @@ static void do_include()
fprintf(depend_file, "%s\n", standby->path);
if (line_direct_flag)
fprintf(yyout, "\n`line %u \"%s\" 1\n", istack->lineno+1, standby->path);
fprintf(yyout, "\n`line 1 \"%s\" 1\n", standby->path);
standby->next = istack;
standby->stringify_flag = 0;