[clang] [C23] Fix handling of alignas (PR #81637)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 13 10:01:36 PST 2024
================
@@ -114,6 +114,19 @@ C Language Changes
C23 Feature Support
^^^^^^^^^^^^^^^^^^^
+- Corrected parsing behavior for the ``alignas`` specifier/qualifier in C23. We
+ previously handled it as an attribute as in C++, but there are parsing
+ differences. The behavioral differences are:
+
+ .. code-block:: c
+
+ struct alignas(8) /* was accepted, now rejected */ S {
+ char alignas(8) /* was rejected, now accepted */ C;
+ };
+ int i alignas(8) /* was accepted, now rejected */ ;
+
+ Fixes (`#81472 <https://github.com/llvm/llvm-project/issues/81472>`_).
+
----------------
AaronBallman wrote:
I can move the code example up there easily enough if you'd like.
https://github.com/llvm/llvm-project/pull/81637
More information about the cfe-commits
mailing list