PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / c11-align-7.c
blob631986ac30fdcda8b8fd2261e67bd1f8a91d635b
1 /* Test C11 alignment support. Test code valid after the resolution
2 of DR#444: alignment specifiers for struct and union members and
3 compound literals. */
4 /* { dg-do compile } */
5 /* { dg-options "-std=c11 -pedantic-errors" } */
7 #include <stddef.h>
9 struct s
11 _Alignas (_Alignof (max_align_t)) char c;
14 union u
16 _Alignas (_Alignof (max_align_t)) char c;
19 char *p = &(_Alignas (_Alignof (max_align_t)) char) { 1 };
20 size_t size = sizeof (_Alignas (_Alignof (max_align_t)) char) { 1 };