]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR preprocessor/92296 (internal compiler error: Segmentation fault ...
authorJakub Jelinek <jakub@redhat.com>
Fri, 8 Nov 2019 18:59:14 +0000 (19:59 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 8 Nov 2019 18:59:14 +0000 (19:59 +0100)
commit299a554aa4ae968f2a1baa12dbaafece1f3e6b31
tree633747cda4e774423ee8ef43e0010bc500c7bfdd
parent66339b297149824c44265b3655aed34cc9ba6ed2
backport: re PR preprocessor/92296 (internal compiler error: Segmentation fault  #pragma push_macro("__LINE__"))

Backported from mainline
2019-10-31  Jakub Jelinek  <jakub@redhat.com>

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: r277987
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