projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa0db43
)
PR c/69507 - bogus warning: ISO C does not allow ‘__alignof__ (expression)’
author
Martin Sebor
<msebor@gcc.gnu.org>
Sun, 19 Jun 2016 16:11:40 +0000
(10:11 -0600)
committer
Martin Sebor
<msebor@gcc.gnu.org>
Sun, 19 Jun 2016 16:11:40 +0000
(10:11 -0600)
From-SVN: r237582
gcc/testsuite/gcc.dg/alignof.c
[new file with mode: 0644]
patch
|
blob
diff --git a/gcc/testsuite/gcc.dg/alignof.c
b/gcc/testsuite/gcc.dg/alignof.c
new file mode 100644
(file)
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\\)." } */
+};