Skip to content

Commit 0f63740

Browse files
author
mpolacek
committed
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254014 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent a7061c2 commit 0f63740

File tree

6 files changed

+17
-5
lines changed

6 files changed

+17
-5
lines changed

gcc/c-family/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2017-10-23 Marek Polacek <[email protected]>
2+
3+
PR c/82681
4+
* c-warn.c (warnings_for_convert_and_check): Fix typos.
5+
16
2017-10-19 Eric Botcazou <[email protected]>
27

38
* c-common.c (check_builtin_function_arguments): Also check arguments

gcc/c-family/c-warn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,12 +1215,12 @@ warnings_for_convert_and_check (location_t loc, tree type, tree expr,
12151215
if (cst)
12161216
warning_at (loc, OPT_Woverflow,
12171217
"overflow in conversion from %qT to %qT "
1218-
"chages value from %qE to %qE",
1218+
"changes value from %qE to %qE",
12191219
exprtype, type, expr, result);
12201220
else
12211221
warning_at (loc, OPT_Woverflow,
12221222
"overflow in conversion from %qT to %qT "
1223-
"chages the value of %qE",
1223+
"changes the value of %qE",
12241224
exprtype, type, expr);
12251225
}
12261226
else

gcc/testsuite/ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2017-10-23 Marek Polacek <[email protected]>
2+
3+
PR c/82681
4+
* gcc.dg/c90-const-expr-11.c: Fix typos in dg-warning.
5+
* gcc.dg/overflow-warn-5.c: Likewise.
6+
* gcc.dg/overflow-warn-8.c: Likewise.
7+
18
2017-10-23 H.J. Lu <[email protected]>
29

310
PR target/82673

gcc/testsuite/gcc.dg/c90-const-expr-11.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ f (void)
2020
/* Overflow. */
2121
struct t b = { INT_MAX + 1 }; /* { dg-warning "integer overflow in expression" } */
2222
/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
23-
struct t c = { DBL_MAX }; /* { dg-warning "overflow in conversion from .double. to .int. chages value " } */
23+
struct t c = { DBL_MAX }; /* { dg-warning "overflow in conversion from .double. to .int. changes value " } */
2424
/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
2525
/* Bad operator outside sizeof. */
2626
struct s d = { 1 ? 1.0 : atan (a.d) }; /* { dg-error "is not a constant expression|near initialization" } */

gcc/testsuite/gcc.dg/overflow-warn-5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
/* { dg-options "-Woverflow" } */
44

55
unsigned char rx_async(unsigned char p) {
6-
return p & 512; /* { dg-warning "overflow in conversion from .int. to .unsigned char. chages value" } */
6+
return p & 512; /* { dg-warning "overflow in conversion from .int. to .unsigned char. changes value" } */
77
}

gcc/testsuite/gcc.dg/overflow-warn-8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void foo (int j)
77
int i3 = 1 + INT_MAX; /* { dg-warning "integer overflow" } */
88
int i4 = +1 + INT_MAX; /* { dg-warning "integer overflow" } */
99
int i5 = (int)((double)1.0 + INT_MAX);
10-
int i6 = (double)1.0 + INT_MAX; /* { dg-warning "overflow in conversion from .double. to .int. chages value" } */
10+
int i6 = (double)1.0 + INT_MAX; /* { dg-warning "overflow in conversion from .double. to .int. changes value" } */
1111
int i7 = 0 ? (int)(double)1.0 + INT_MAX : 1;
1212
int i8 = 1 ? 1 : (int)(double)1.0 + INT_MAX;
1313
int i9 = j ? (int)(double)1.0 + INT_MAX : 1; /* { dg-warning "integer overflow" } */

0 commit comments

Comments
 (0)