re PR c/82681 (c-warn.c:1218: typo in warning message)
PR c/82681 * c-warn.c (warnings_for_convert_and_check): Fix typos. * gcc.dg/c90-const-expr-11.c: Fix typos in dg-warning. * gcc.dg/overflow-warn-5.c: Likewise. * gcc.dg/overflow-warn-8.c: Likewise. From-SVN: r254014
This commit is contained in:
parent
66f4014d4b
commit
d104746519
|
@ -1,3 +1,8 @@
|
|||
2017-10-23 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c/82681
|
||||
* c-warn.c (warnings_for_convert_and_check): Fix typos.
|
||||
|
||||
2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* c-common.c (check_builtin_function_arguments): Also check arguments
|
||||
|
|
|
@ -1215,12 +1215,12 @@ warnings_for_convert_and_check (location_t loc, tree type, tree expr,
|
|||
if (cst)
|
||||
warning_at (loc, OPT_Woverflow,
|
||||
"overflow in conversion from %qT to %qT "
|
||||
"chages value from %qE to %qE",
|
||||
"changes value from %qE to %qE",
|
||||
exprtype, type, expr, result);
|
||||
else
|
||||
warning_at (loc, OPT_Woverflow,
|
||||
"overflow in conversion from %qT to %qT "
|
||||
"chages the value of %qE",
|
||||
"changes the value of %qE",
|
||||
exprtype, type, expr);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2017-10-23 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c/82681
|
||||
* gcc.dg/c90-const-expr-11.c: Fix typos in dg-warning.
|
||||
* gcc.dg/overflow-warn-5.c: Likewise.
|
||||
* gcc.dg/overflow-warn-8.c: Likewise.
|
||||
|
||||
2017-10-23 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/82673
|
||||
|
|
|
@ -20,7 +20,7 @@ f (void)
|
|||
/* Overflow. */
|
||||
struct t b = { INT_MAX + 1 }; /* { dg-warning "integer overflow in expression" } */
|
||||
/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
|
||||
struct t c = { DBL_MAX }; /* { dg-warning "overflow in conversion from .double. to .int. chages value " } */
|
||||
struct t c = { DBL_MAX }; /* { dg-warning "overflow in conversion from .double. to .int. changes value " } */
|
||||
/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
|
||||
/* Bad operator outside sizeof. */
|
||||
struct s d = { 1 ? 1.0 : atan (a.d) }; /* { dg-error "is not a constant expression|near initialization" } */
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
/* { dg-options "-Woverflow" } */
|
||||
|
||||
unsigned char rx_async(unsigned char p) {
|
||||
return p & 512; /* { dg-warning "overflow in conversion from .int. to .unsigned char. chages value" } */
|
||||
return p & 512; /* { dg-warning "overflow in conversion from .int. to .unsigned char. changes value" } */
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ void foo (int j)
|
|||
int i3 = 1 + INT_MAX; /* { dg-warning "integer overflow" } */
|
||||
int i4 = +1 + INT_MAX; /* { dg-warning "integer overflow" } */
|
||||
int i5 = (int)((double)1.0 + INT_MAX);
|
||||
int i6 = (double)1.0 + INT_MAX; /* { dg-warning "overflow in conversion from .double. to .int. chages value" } */
|
||||
int i6 = (double)1.0 + INT_MAX; /* { dg-warning "overflow in conversion from .double. to .int. changes value" } */
|
||||
int i7 = 0 ? (int)(double)1.0 + INT_MAX : 1;
|
||||
int i8 = 1 ? 1 : (int)(double)1.0 + INT_MAX;
|
||||
int i9 = j ? (int)(double)1.0 + INT_MAX : 1; /* { dg-warning "integer overflow" } */
|
||||
|
|
Loading…
Reference in New Issue