Clang 17 introduced the ability to parse C++11-style [[attributes]] even in C++98 mode.
Compile the line above with -std=c++11 and it compiles fine.
But compile it with -std=c++03 and you get a bogus error:
<source>:1:10: error: 'visibility' attribute takes one argument
1 | struct [[gnu::visibility("default")]] S {};
| ^
There is one argument there! So Clang shouldn't be complaining, should it?
https://godbolt.org/z/bMoKTsc38
Clang 17 introduced the ability to parse C++11-style
[[attributes]]
even in C++98 mode. Compile the line above with-std=c++11
and it compiles fine. But compile it with-std=c++03
and you get a bogus error:There is one argument there! So Clang shouldn't be complaining, should it?