aboutsummaryrefslogtreecommitdiff
path: root/libcpp/directives.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/directives.c')
-rw-r--r--libcpp/directives.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libcpp/directives.c b/libcpp/directives.c
index 61f1fef..6e011a1 100644
--- a/libcpp/directives.c
+++ b/libcpp/directives.c
@@ -1582,6 +1582,8 @@ do_pragma_push_macro (cpp_reader *pfile)
node = _cpp_lex_identifier (pfile, c->name);
if (node->type == NT_VOID)
c->is_undef = 1;
+ else if (node->type == NT_BUILTIN_MACRO)
+ c->is_builtin = 1;
else
{
defn = cpp_macro_definition (pfile, node);
@@ -2470,6 +2472,11 @@ cpp_pop_definition (cpp_reader *pfile, struct def_pragma_macro *c)
if (c->is_undef)
return;
+ if (c->is_builtin)
+ {
+ _cpp_restore_special_builtin (pfile, c);
+ return;
+ }
{
size_t namelen;