aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2016-06-20 15:46:09 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2016-06-20 09:46:09 -0600
commitd9e8bdfd905b5db38c452eff6f441cb59c26fef7 (patch)
tree5afb5c74d650ba8575ae6650a8daf95e49ce5ffe /gcc
parent67785479182cd32045994a4c48e9f374ac99b564 (diff)
downloadgcc-d9e8bdfd905b5db38c452eff6f441cb59c26fef7.zip
gcc-d9e8bdfd905b5db38c452eff6f441cb59c26fef7.tar.gz
gcc-d9e8bdfd905b5db38c452eff6f441cb59c26fef7.tar.bz2
PR c/69507 - bogus warning: ISO C does not allow __alignof__ (expression)
gcc/testsuite/ChangeLog: * gnu89-const-expr-1.c: Avoid diagnosing __alignof__ as not conforming. * gnu90-const-expr-1.c: Same. * gnu99-const-expr-1.c: Same. * gnu99-static-1.c: Same. From-SVN: r237606
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gcc.dg/gnu89-const-expr-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/gnu90-const-expr-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/gnu99-const-expr-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/gnu99-static-1.c4
5 files changed, 13 insertions, 5 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 369300d..0570b22 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2016-06-20 Martin Sebor <msebor@redhat.com>
+
+ PR c/69507
+ * gnu89-const-expr-1.c: Avoid diagnosing __alignof__ as not conforming.
+ * gnu90-const-expr-1.c: Same.
+ * gnu99-const-expr-1.c: Same.
+ * gnu99-static-1.c: Same.
+
2016-06-20 Renlin Li <renlin.li@arm.com>
* gcc.dg/tree-ssa/attr-hotcold-2.c: Fix syntax errors.
diff --git a/gcc/testsuite/gcc.dg/gnu89-const-expr-1.c b/gcc/testsuite/gcc.dg/gnu89-const-expr-1.c
index 0cc14da..4fd6671 100644
--- a/gcc/testsuite/gcc.dg/gnu89-const-expr-1.c
+++ b/gcc/testsuite/gcc.dg/gnu89-const-expr-1.c
@@ -23,7 +23,7 @@ f (void)
E5 = __imag__ 0,
/* __alignof__ always constant. */
E6 = __alignof__ (int[n]), /* { dg-error "ISO C90 forbids variable length array" } */
- E7 = __alignof__ (a), /* { dg-error "__alignof__ \\(expression\\)" } */
+ E7 = __alignof__ (a),
/* __extension__ ignored for constant expression purposes. */
E8 = __extension__ (1 ? 0 : i++), /* { dg-error "constant expression" } */
E9 = __extension__ 0,
diff --git a/gcc/testsuite/gcc.dg/gnu90-const-expr-1.c b/gcc/testsuite/gcc.dg/gnu90-const-expr-1.c
index e052114..3f7f1af 100644
--- a/gcc/testsuite/gcc.dg/gnu90-const-expr-1.c
+++ b/gcc/testsuite/gcc.dg/gnu90-const-expr-1.c
@@ -23,7 +23,7 @@ f (void)
E5 = __imag__ 0,
/* __alignof__ always constant. */
E6 = __alignof__ (int[n]), /* { dg-error "ISO C90 forbids variable length array" } */
- E7 = __alignof__ (a), /* { dg-error "__alignof__ \\(expression\\)" } */
+ E7 = __alignof__ (a),
/* __extension__ ignored for constant expression purposes. */
E8 = __extension__ (1 ? 0 : i++), /* { dg-error "constant expression" } */
E9 = __extension__ 0,
diff --git a/gcc/testsuite/gcc.dg/gnu99-const-expr-1.c b/gcc/testsuite/gcc.dg/gnu99-const-expr-1.c
index da7076f..3f5f25e 100644
--- a/gcc/testsuite/gcc.dg/gnu99-const-expr-1.c
+++ b/gcc/testsuite/gcc.dg/gnu99-const-expr-1.c
@@ -23,7 +23,7 @@ f (void)
E5 = __imag__ 0,
/* __alignof__ always constant. */
E6 = __alignof__ (int[n]),
- E7 = __alignof__ (a), /* { dg-error "__alignof__ \\(expression\\)" } */
+ E7 = __alignof__ (a),
/* __extension__ ignored for constant expression purposes. */
E8 = __extension__ (1 ? 0 : i++), /* { dg-error "constant expression" } */
E9 = __extension__ 0,
diff --git a/gcc/testsuite/gcc.dg/gnu99-static-1.c b/gcc/testsuite/gcc.dg/gnu99-static-1.c
index 3fece61..982113b 100644
--- a/gcc/testsuite/gcc.dg/gnu99-static-1.c
+++ b/gcc/testsuite/gcc.dg/gnu99-static-1.c
@@ -10,8 +10,8 @@
/* { dg-options "-O2 -std=gnu99 -pedantic-errors" } */
/* __alignof__, OK. */
-static int f0(void);
-void g0(void) { __alignof__(f0()); } /* { dg-error "__alignof__ \\(expression\\)" } */
+static int f0(void);
+void g0(void) { __alignof__(f0()); }
/* __typeof__ not variably modified, OK. */
static int f1(void);