From 5112abecf231f4a0f8978111438ac0328b671604 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Sun, 19 Jun 2016 10:11:40 -0600 Subject: [PATCH] =?utf8?q?PR=20c/69507=20-=20bogus=20warning:=20ISO=20C=20?= =?utf8?q?does=20not=20allow=20=E2=80=98=5F=5Falignof=5F=5F=20(expression)?= =?utf8?q?=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit From-SVN: r237582 --- 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\\)." } */ +}; -- 2.30.2