re PR preprocessor/88974 (ICE: Segmentation fault (in linemap_resolve_location))

PR preprocessor/88974
	* directives.c (SEEN_EOL): Move macro to ...
	* internal.h (SEEN_EOL): ... here.
	* expr.c (parse_has_include): Don't cpp_get_token if SEEN_EOL ().

	* c-c++-common/cpp/pr88974.c: New test.

From-SVN: r268285
This commit is contained in:
Jakub Jelinek 2019-01-26 11:08:00 +01:00 committed by Jakub Jelinek
parent 2f6a6b28eb
commit 18f5df94df
6 changed files with 21 additions and 3 deletions

View file

@ -2238,7 +2238,7 @@ parse_has_include (cpp_reader *pfile, enum include_type type)
XDELETEVEC (fname);
}
if (paren && cpp_get_token (pfile)->type != CPP_CLOSE_PAREN)
if (paren && !SEEN_EOL () && cpp_get_token (pfile)->type != CPP_CLOSE_PAREN)
cpp_error (pfile, CPP_DL_ERROR,
"missing ')' after \"__has_include__\"");