1 /* Test C11 alignment support. Test invalid code. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c11 -pedantic-errors" } */
6 void bar1 (int [_Alignas (double) 10]); /* { dg-error "expected expression before" } */
7 void bar2 (int [static _Alignas (double) 10]); /* { dg-error "expected expression before" } */
8 void bar3 (int [static const _Alignas (double) 10]); /* { dg-error "expected expression before" } */
9 void bar4 (int [const _Alignas (double) 10]); /* { dg-error "expected expression before" } */
10 void bar5 (int [_Alignas (0) *]); /* { dg-error "expected expression before" } */
12 void foo (int a
[_Alignas (0) 10]) { } /* { dg-error "expected expression before" } */
17 int *_Alignas (long) p
; /* { dg-error "expected" } */
18 int *const _Alignas (long) *q
; /* { dg-error "expected" } */
20 __builtin_offsetof (struct s
_Alignas (int), n
); /* { dg-error "expected" } */
21 __typeof (long double _Alignas (0)) e
; /* { dg-error "expected" } */
22 sizeof (int _Alignas (int)); /* { dg-error "specified for type name" } */
23 _Alignas (int _Alignas (float)) int t
; /* { dg-error "expected" } */
24 __builtin_types_compatible_p (signed _Alignas (0), unsigned); /* { dg-error "expected" } */
25 int a
[_Alignas (int) 10]; /* { dg-error "expected expression before" } */