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/internal.h | |
parent | 2f6a6b28ebec12d88256c90a34288f33cbfd607e (diff) |
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/internal.h')
-rw-r--r-- | libcpp/internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcpp/internal.h b/libcpp/internal.h index 0bd7df98585..77a2a3becb3 100644 --- a/libcpp/internal.h +++ b/libcpp/internal.h @@ -593,6 +593,8 @@ struct cpp_reader #define is_nvspace(x) IS_NVSPACE(x) #define is_space(x) IS_SPACE_OR_NUL(x) +#define SEEN_EOL() (pfile->cur_token[-1].type == CPP_EOF) + /* This table is constant if it can be initialized at compile time, which is the case if cpp was compiled with GCC >=2.7, or another compiler that supports C99. */ |