[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 18 09:46:38 PDT 2023
================
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -verify %s
+// RUN: not %clang_cc1 -std=c99 -pedantic -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXT %s
+
+_Alignas(int) struct c1; // expected-warning {{attribute '_Alignas' before "struct" is ignored}}
+alignas(int) struct c1; // expected-warning {{attribute 'alignas' before "struct" is ignored}}
----------------
AaronBallman wrote:
> Is it possible to decouple C23 from this what this PR addresses?
Yeah, I think that's a good idea; there's plenty of moving parts here.
https://github.com/llvm/llvm-project/pull/65638
More information about the cfe-commits
mailing list