Commit d9e8bdfd by Martin Sebor Committed by Martin Sebor

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
parent 67785479
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.
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment