re PR preprocessor/92296 (internal compiler error: Segmentation fault #pragma push_m...
authorJakub Jelinek <jakub@redhat.com>
Thu, 31 Oct 2019 17:38:44 +0000 (18:38 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 31 Oct 2019 17:38:44 +0000 (18:38 +0100)
commitaa23e73b1a090659344ff88361135bd947064e30
treeab29c66793009b48773fdd1844beac65d7c2a2a1
parent0092b21f24a6778a54caac4015db1d0ad6291a45
re PR preprocessor/92296 (internal compiler error: Segmentation fault  #pragma push_macro("__LINE__"))

PR preprocessor/92296
* internal.h (struct def_pragma_macro): Add is_builtin bitfield.
(_cpp_restore_special_builtin): Declare.
* init.c (_cpp_restore_special_builtin): New function.
* directives.c (do_pragma_push_macro): For NT_BUILTIN_MACRO
set is_builtin and don't try to grab definition.
(cpp_pop_definition): Use _cpp_restore_special_builtin to restore
builtin macros.

* c-c++-common/cpp/pr92296-1.c: New test.
* c-c++-common/cpp/pr92296-2.c: New test.

From-SVN: r277685
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/cpp/pr92296-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/cpp/pr92296-2.c [new file with mode: 0644]
libcpp/ChangeLog
libcpp/directives.c
libcpp/init.c
libcpp/internal.h