diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-01-26 11:08:00 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-01-26 11:08:00 +0100 |
commit | 18f5df94df9a8abcbf9410c79c180de6f7b85f51 (patch) | |
tree | 9c09a82425d5c1d2c2859f73f4ca6281c4a446b8 /libcpp/expr.c | |
parent | 2f6a6b28ebec12d88256c90a34288f33cbfd607e (diff) | |
download | gcc-18f5df94df9a8abcbf9410c79c180de6f7b85f51.zip gcc-18f5df94df9a8abcbf9410c79c180de6f7b85f51.tar.gz gcc-18f5df94df9a8abcbf9410c79c180de6f7b85f51.tar.bz2 |
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
Diffstat (limited to 'libcpp/expr.c')
-rw-r--r-- | libcpp/expr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcpp/expr.c b/libcpp/expr.c index 6ab5493..d8438a5 100644 --- a/libcpp/expr.c +++ b/libcpp/expr.c @@ -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__\""); |