forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
c++clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendrejects-valid
Description
https://godbolt.org/z/bMoKTsc38
struct [[gnu::visibility("default")]] S {};
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?
Metadata
Metadata
Assignees
Labels
c++clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendrejects-valid