diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/overflow-warn-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/overflow-warn-1.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/testsuite/gcc.dg/overflow-warn-1.c b/gcc/testsuite/gcc.dg/overflow-warn-1.c index 78909df..48185e9 100644 --- a/gcc/testsuite/gcc.dg/overflow-warn-1.c +++ b/gcc/testsuite/gcc.dg/overflow-warn-1.c @@ -13,11 +13,11 @@ enum e { in the standard). */ E2 = 2 || 1 / 0, E3 = 1 / 0, /* { dg-warning "10:division by zero" } */ - /* { dg-error "3:enumerator value for 'E3' is not an integer constant" "enum error" { target *-*-* } 15 } */ + /* { dg-error "3:enumerator value for 'E3' is not an integer constant" "enum error" { target *-*-* } .-1 } */ /* But as in DR#031, the 1/0 in an evaluated subexpression means the whole expression violates the constraints. */ E4 = 0 * (1 / 0), /* { dg-warning "15:division by zero" } */ - /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target *-*-* } 19 } */ + /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target *-*-* } .-1 } */ E5 = INT_MAX + 1, /* { dg-warning "16:integer overflow in expression" } */ /* Again, overflow in evaluated subexpression. */ E6 = 0 * (INT_MAX + 1), /* { dg-warning "21:integer overflow in expression" } */ @@ -28,7 +28,7 @@ enum e { struct s { int a; int : 0 * (1 / 0); /* { dg-warning "16:division by zero" } */ - /* { dg-error "not an integer constant" "22:integer constant" { target *-*-* } 30 } */ + /* { dg-error "not an integer constant" "22:integer constant" { target *-*-* } .-1 } */ int : 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */ }; @@ -47,10 +47,10 @@ static int sc = INT_MAX + 1; /* { dg-warning "25:integer overflow in expression" constants. The third has the overflow in an unevaluated subexpression, so is a null pointer constant. */ void *p = 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */ -/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } 49 } */ +/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-1 } */ void *q = 0 * (1 / 0); /* { dg-warning "division by zero" } */ -/* { dg-error "initializer element is not computable at load time" "constant" { target *-*-* } 51 } */ -/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } 51 } */ +/* { dg-error "initializer element is not computable at load time" "constant" { target *-*-* } .-1 } */ +/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */ void *r = (1 ? 0 : INT_MAX+1); void @@ -59,7 +59,7 @@ g (int i) switch (i) { case 0 * (1/0): /* { dg-warning "division by zero" } */ - /* { dg-error "case label does not reduce to an integer constant" "constant" { target *-*-* } 61 } */ + /* { dg-error "case label does not reduce to an integer constant" "constant" { target *-*-* } .-1 } */ ; case 1 + 0 * (INT_MAX + 1): /* { dg-warning "integer overflow in expression" } */ ; |