summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/alignof.c
blob: d018b44025d94176d1668d7c02572335b86735d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* PR c/69507 - bogus warning: ISO C does not allow '__alignof__ (expression)'
 */
/* { dg-do compile } */
/* { dg-options "-std=c11 -Wno-error -Wpedantic" } */

extern int e;

int a[] = {
    __alignof__ (e),
    _Alignof (e)       /* { dg-warning "ISO C does not allow ._Alignof \\(expression\\)." } */
};