diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/gnu90-const-expr-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/gnu90-const-expr-1.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/testsuite/gcc.dg/gnu90-const-expr-1.c b/gcc/testsuite/gcc.dg/gnu90-const-expr-1.c index 3f7f1af..0a76ff6 100644 --- a/gcc/testsuite/gcc.dg/gnu90-const-expr-1.c +++ b/gcc/testsuite/gcc.dg/gnu90-const-expr-1.c @@ -14,7 +14,7 @@ f (void) /* Integer constant expressions may not contain statement expressions (not a permitted operand). */ E1 = (1 ? 0 : ({ 0; })), /* { dg-error "constant expression" } */ - /* { dg-error "ISO C forbids braced-groups" "ISO" { target *-*-* } 16 } */ + /* { dg-error "ISO C forbids braced-groups" "ISO" { target *-*-* } .-1 } */ /* Real and imaginary parts act like other arithmetic operators. */ E2 = __real__ (1 ? 0 : i++), /* { dg-error "constant expression" } */ @@ -30,27 +30,27 @@ f (void) /* Conditional expressions with omitted arguments act like the standard type. */ E10 = (1 ? : i++), /* { dg-error "constant expression" } */ - /* { dg-error "ISO C forbids omitting" "ISO" { target *-*-* } 32 } */ + /* { dg-error "ISO C forbids omitting" "ISO" { target *-*-* } .-1 } */ E11 = (1 ? : 0) /* { dg-error "ISO C forbids omitting" } */ }; enum e2 { /* Complex integer constants may be cast directly to integer types, but not after further arithmetic on them. */ F1 = (int) (_Complex int) 2i, /* { dg-error "constant expression" } */ - /* { dg-error "complex" "complex" { target *-*-* } 39 } */ - /* { dg-error "imaginary" "imaginary" { target *-*-* } 39 } */ + /* { dg-error "complex" "complex" { target *-*-* } .-1 } */ + /* { dg-error "imaginary" "imaginary" { target *-*-* } .-2 } */ F2 = (int) +2i, /* { dg-error "constant expression" } */ - /* { dg-error "imaginary" "ISO" { target *-*-* } 42 } */ + /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */ F3 = (int) (1 + 2i), /* { dg-error "constant expression" } */ - /* { dg-error "imaginary" "ISO" { target *-*-* } 44 } */ + /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */ F4 = (int) 2i /* { dg-error "imaginary" } */ }; static double dr = __real__ (1.0 + 2.0i); - /* { dg-error "imaginary" "ISO" { target *-*-* } 48 } */ + /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */ static double di = __imag__ (1.0 + 2.0i); - /* { dg-error "imaginary" "ISO" { target *-*-* } 50 } */ + /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */ /* Statement expressions allowed in unevaluated subexpressions in initializers in gnu99 but not gnu89. */ static int j = (1 ? 0 : ({ 0; })); /* { dg-error "constant expression" } */ - /* { dg-error "braced" "ISO" { target *-*-* } 54 } */ + /* { dg-error "braced" "ISO" { target *-*-* } .-1 } */ } |