Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion libcpp/directives.cc
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,12 @@ do_line (cpp_reader *pfile)
&new_lineno, &wrapped))
{
if (token->type == CPP_EOF)
cpp_error (pfile, CPP_DL_ERROR, "unexpected end of file after #line");
{
if (pfile->buffer->next_line < pfile->buffer->rlimit)
cpp_error (pfile, CPP_DL_ERROR, "missing #line directive arguments");
else
cpp_error (pfile, CPP_DL_ERROR, "unexpected end of file after #line");
}
else
cpp_error (pfile, CPP_DL_ERROR,
"\"%s\" after #line is not a positive integer",
Expand Down