On 19/08/2025 19:06, Jason Merrill wrote:
On 8/19/25 4:49 AM, Alfie Richards wrote:
Adds the target_version and target_clones attributes to diagnostic messages
for target_version semantics.

This is because the target_version/target_clones attributes affect the identity
of the decls, so need to be represented in diagnostics for them.

After this change diagnostics look like:

c:
```
test.c:6:8: error: redefinition of ‘foo [[target_version("sve")]]’
     6 | float  foo  () {return 1;}
       |        ^~~
```

c++:
```
test.cpp:6:8: error: redefinition of ‘[[target_version("sve")]] float foo()’
     6 | float  foo  () {return 1;}
       |        ^~~
```

This is valid attribute syntax, but I'm not sure why we wouldn't want to put the attribute immediately after the name for C++ as well?
Ah yeah that makes sense. I realise I misinterpreted your feedback last time. I will change that for V10 to match.>
Jason


Reply via email to