https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65238

--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
well, I suppose, before digging deeper into fixing this, the question is
"should __has_attribute/__has_cpp_attribute be enabled for traditional"?

if not ..  (using the 'keep non-traditional cpp builtins at the end' from
init.c) then I suppose something like:

diff --git a/libcpp/init.c b/libcpp/init.c
index 45a4d13..3f6cd4d 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -455,7 +455,7 @@ cpp_init_special_builtins (cpp_reader *pfile)
   size_t n = ARRAY_SIZE (builtin_array);

   if (CPP_OPTION (pfile, traditional))
-    n -= 2;
+    n -= 4;
   else if (! CPP_OPTION (pfile, stdc_0_in_system_headers)
           || CPP_OPTION (pfile, std))
     n--;


.. would work.

Reply via email to