]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libcpp/directives.c
re PR preprocessor/92296 (internal compiler error: Segmentation fault #pragma push_m...
[thirdparty/gcc.git] / libcpp / directives.c
index 61f1fef94892511a6b25473e179b8a0420926a6a..6e011a1bae25062d8ef84f27cf8d30c6075201f7 100644 (file)
@@ -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;