From: msebor Date: Sun, 19 Jun 2016 16:11:40 +0000 (+0000) Subject: PR c/69507 - bogus warning: ISO C does not allow ‘__alignof__ (expression)’ X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b4b12fd4a13c8d5292151f1e832cc71e28fa39d;p=thirdparty%2Fgcc.git PR c/69507 - bogus warning: ISO C does not allow ‘__alignof__ (expression)’ git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237582 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/gcc.dg/alignof.c b/gcc/testsuite/gcc.dg/alignof.c new file mode 100644 index 000000000000..d018b44025d9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/alignof.c @@ -0,0 +1,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\\)." } */ +};