From 0b4b12fd4a13c8d5292151f1e832cc71e28fa39d Mon Sep 17 00:00:00 2001 From: msebor Date: Sun, 19 Jun 2016 16:11:40 +0000 Subject: =?UTF-8?q?PR=20c/69507=20-=20bogus=20warning:=20ISO=20C=20does=20?= =?UTF-8?q?not=20allow=20=E2=80=98=5F=5Falignof=5F=5F=20(expression)?= =?UTF-8?q?=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237582 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/gcc.dg/alignof.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/alignof.c diff --git a/gcc/testsuite/gcc.dg/alignof.c b/gcc/testsuite/gcc.dg/alignof.c new file mode 100644 index 00000000000..d018b44025d --- /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\\)." } */ +}; -- cgit v1.2.1