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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Anyway,
#ifdef __has_c_attribute
#if __has_c_attribute (clang::unsafe_buffer_usage)
int i;
#endif
#endif
#ifdef __has_cpp_attribute
#if __has_cpp_attribute (clang::unsafe_buffer_usage)
int j;
#endif
#endif
fails to preprocess with GCC from 5.1 till trunk with -std=c11 and fails with
clang 6 - 16 as well, just clang 17+ accepts it (and obviously the old versions
of the compiler don't predefine those macros).  So, if they care about
portability, they should fix it.

Reply via email to