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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jsm28 at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Only C23 supports the [[vendor::attr]] attributes,
#if __has_c_attribute (clang::unsafe_buffer_usage)
int i;
#endif
#if __has_cpp_attribute (clang::unsafe_buffer_usage)
int j;
#endif
compiles just fine with the default -std=gnu17 or -std=gnu11 or -std=c23,
just doesn't with -std=c11.
Though, guess __has_c_attribute is just an extension in C11 (and
__has_cpp_attribute is a C++ macro, not C), so maybe we could as an extension
handle the scoped attributes in there, but not sure if it should then result in
0 for anything scoped, or just if not in gnu namespace.

Reply via email to