| Issue |
168901
|
| Summary |
[Clang] Clang accepts NonIdentifier string in the attribute list.
|
| Labels |
clang,
clang:frontend,
clang:diagnostics
|
| Assignees |
|
| Reporter |
da-viper
|
```cpp
// main.cpp
[[gnu::abi_tag("[[something]]")]]
int get_int() {
return 0;
}
int main() {
int ret = get_int();
return 0;
}
```
with clang
```
$> clang++ test.cpp
$>
```
with g++
```
$> g++ test.cpp
test.cpp:3:13: error: arguments to the ‘abi_tag’ attribute must contain valid identifiers
3 | int get_int() {
| ^
test.cpp:3:13: note: ‘[’ is not a valid first character for an identifier
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs