AaronBallman wrote:

> I'm not sure I understand what happened here, since `_Alignas` did work 
> properly before this change, right? How/why are `_Alignas` and `alignas` 
> acting differently from eachother in C23 mode?

`_Alignas` on a field used to work properly before 
b9cf7f1066cc7ec11c6074d10b0f2ec9a3ae72d9, but that commit changed `alignas` 
handling improperly. The issue boils down to the fact that C++ treats `alignas` 
as an attribute and C treats `_Alignas` (and now `alignas` as of C23) as a type 
specifier rather than an attribute. We were originally leaning on the C++ 
implementation when the keyword was spelled `alignas` and we missed some 
changes to make that work in C, which is what this commit is addressing (by 
ensuring the attribute moves onto the declarator where it belongs and used to 
be found).

https://github.com/llvm/llvm-project/pull/98642
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to