diff options
author | Martin Sebor <msebor@gcc.gnu.org> | 2016-06-19 10:11:40 -0600 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2016-06-19 10:11:40 -0600 |
commit | 5112abecf231f4a0f8978111438ac0328b671604 (patch) | |
tree | 8cd854ca7422ba83037bd2728ac87e2ed6fdf471 /gcc | |
parent | aa0db437bce053c3e9fe55ad422b0807aad8b290 (diff) | |
download | gcc-5112abecf231f4a0f8978111438ac0328b671604.zip gcc-5112abecf231f4a0f8978111438ac0328b671604.tar.gz gcc-5112abecf231f4a0f8978111438ac0328b671604.tar.bz2 |
PR c/69507 - bogus warning: ISO C does not allow ‘__alignof__ (expression)’
From-SVN: r237582
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.dg/alignof.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/alignof.c b/gcc/testsuite/gcc.dg/alignof.c new file mode 100644 index 0000000..d018b44 --- /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\\)." } */ +}; |