aaron.ballman added a comment.

C2x clarified the behavior of *standard* attributes when determining a 
composite type, and this particular case really straddles that boundary. We 
support `[[noreturn]]` and `_Noreturn` as standard attributes in C as well as 
`__attribute__((noreturn))` (as a nonstandard attribute with the same semantics 
as the standard attribute).

C2x 6.2.7p3 says, in part: "If one of the types has a standard attribute, the 
composite type also has that attribute." which is the current behavior before 
your patch. So this change introduces a regression for C2x for the standard 
attribute spelling but is fine for the GNU attribute spelling, but do we really 
want to have different answers depending on how the user spells the attribute? 
(FWIW, this change came in as part of the "unsequenced functions" attribute 
paper: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140868/new/

https://reviews.llvm.org/D140868

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to