This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81513] __has_cpp_attribute returns non-zero in C++03 mode, but attributes don't work
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 22 Jul 2017 20:40:06 +0000
- Subject: [Bug c++/81513] __has_cpp_attribute returns non-zero in C++03 mode, but attributes don't work
- Auto-submitted: auto-generated
- References: <bug-81513-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81513
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The C++11 attribute syntax isn't supported in C++03 mode, but the noreturn
attribute is supported using the GNU attribute syntax (and has been for years)
so it's right for that to be non-zero. I'm not sure why maybe_unused is
non-zero but doesn't work. __attribute__((unused)) works, but
__attribute__((maybe_unused)) doesn't.