xref: /llvm-project/clang/test/C/C2y/n3273.c (revision a0ab0ca7a733eb9e8e6442676a974ff8a2cdb930)
1 // RUN: %clang_cc1 -verify -std=c2y -Wall -pedantic -Wpre-c2y-compat %s
2 // RUN: %clang_cc1 -verify=pre-c2y -std=c23 -Wall -pedantic %s
3 
4 /* WG14 N3273: Clang 3.5
5  * alignof of an incomplete array type
6  */
7 
8 static_assert(
9   alignof(int[]) == /* pre-c2y-warning {{'alignof' on an incomplete array type is a C2y extension}}
10                        expected-warning {{'alignof' on an incomplete array type is incompatible with C standards before C2y}}
11                      */
12   alignof(int)
13 );
14 
15