From: Marek Polacek Date: Mon, 23 Oct 2017 17:03:11 +0000 (+0000) Subject: re PR c/82681 (c-warn.c:1218: typo in warning message) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1047465199d48014b8e81cd4a7ba9d0365e6fe3;p=gcc.git 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 --- diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 963c79a7e2b..552c68084d7 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2017-10-23 Marek Polacek + + PR c/82681 + * c-warn.c (warnings_for_convert_and_check): Fix typos. + 2017-10-19 Eric Botcazou * c-common.c (check_builtin_function_arguments): Also check arguments diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index cb1db0327c3..78f6ba83d98 100644 --- a/gcc/c-family/c-warn.c +++ b/gcc/c-family/c-warn.c @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f4c09481911..97055524d4a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2017-10-23 Marek Polacek + + 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 PR target/82673 diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-11.c b/gcc/testsuite/gcc.dg/c90-const-expr-11.c index e4f2aff7874..a2720c47bf4 100644 --- a/gcc/testsuite/gcc.dg/c90-const-expr-11.c +++ b/gcc/testsuite/gcc.dg/c90-const-expr-11.c @@ -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" } */ diff --git a/gcc/testsuite/gcc.dg/overflow-warn-5.c b/gcc/testsuite/gcc.dg/overflow-warn-5.c index b2c8dc31d95..1a5aa0c6059 100644 --- a/gcc/testsuite/gcc.dg/overflow-warn-5.c +++ b/gcc/testsuite/gcc.dg/overflow-warn-5.c @@ -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" } */ } diff --git a/gcc/testsuite/gcc.dg/overflow-warn-8.c b/gcc/testsuite/gcc.dg/overflow-warn-8.c index ace605517dc..e76bcac5e07 100644 --- a/gcc/testsuite/gcc.dg/overflow-warn-8.c +++ b/gcc/testsuite/gcc.dg/overflow-warn-8.c @@ -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" } */