From 234c38181acfb1e3980bd4a6974328d097b922f1 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 13 Jan 2019 12:53:47 +0000 Subject: [PATCH] C-family: Replace "may may" with "may" in warning message gcc/c-family/ * c-warn.c (warn_for_address_or_pointer_of_packed_member): Replace "may may" with "may" in warning message. gcc/testsuite/ * gcc.dg/pr51628-20.c: Updated. * gcc.dg/pr51628-21.c: Likewise. * gcc.dg/pr51628-25.c: Likewise. From-SVN: r267904 --- gcc/c-family/ChangeLog | 5 +++++ gcc/c-family/c-warn.c | 2 +- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/pr51628-20.c | 2 +- gcc/testsuite/gcc.dg/pr51628-21.c | 2 +- gcc/testsuite/gcc.dg/pr51628-25.c | 2 +- 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index a7b56ff18e9..d1b4d25483d 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2019-01-13 H.J. Lu + + * c-warn.c (warn_for_address_or_pointer_of_packed_member): + Replace "may may" with "may" in warning message. + 2019-01-07 Jakub Jelinek PR c++/85052 diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index f84736716b6..79b2d8ad449 100644 --- a/gcc/c-family/c-warn.c +++ b/gcc/c-family/c-warn.c @@ -2828,7 +2828,7 @@ warn_for_address_or_pointer_of_packed_member (bool convert_p, tree type, location_t location = EXPR_LOC_OR_LOC (rhs, input_location); warning_at (location, OPT_Waddress_of_packed_member, "converting a packed %qT pointer (alignment %d) " - "to %qT (alignment %d) may may result in an " + "to %qT (alignment %d) may result in an " "unaligned pointer value", rhstype, rhs_align, type, type_align); tree decl = TYPE_STUB_DECL (TREE_TYPE (rhstype)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 609320e6f7d..10bf8bdc107 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-01-13 H.J. Lu + + * gcc.dg/pr51628-20.c: Updated. + * gcc.dg/pr51628-21.c: Likewise. + * gcc.dg/pr51628-25.c: Likewise. + 2019-01-13 Thomas Koenig PR fortran/59345 diff --git a/gcc/testsuite/gcc.dg/pr51628-20.c b/gcc/testsuite/gcc.dg/pr51628-20.c index 80888283b73..bcdbff1e554 100644 --- a/gcc/testsuite/gcc.dg/pr51628-20.c +++ b/gcc/testsuite/gcc.dg/pr51628-20.c @@ -8,4 +8,4 @@ struct C { struct B b; } __attribute__ ((packed)); extern struct C *p; long* g8 (void) { return p; } -/* { dg-warning "may may result in an unaligned pointer value" "" { target *-*-* } .-1 } */ +/* { dg-warning "may result in an unaligned pointer value" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/pr51628-21.c b/gcc/testsuite/gcc.dg/pr51628-21.c index 3077e72c8d5..0c7fab75d8a 100644 --- a/gcc/testsuite/gcc.dg/pr51628-21.c +++ b/gcc/testsuite/gcc.dg/pr51628-21.c @@ -8,4 +8,4 @@ struct C { struct B b; } __attribute__ ((packed)); extern struct C p[]; long* g8 (void) { return p; } -/* { dg-warning "may may result in an unaligned pointer value" "" { target *-*-* } .-1 } */ +/* { dg-warning "may result in an unaligned pointer value" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/pr51628-25.c b/gcc/testsuite/gcc.dg/pr51628-25.c index 2fc5c028711..94a3a8fbaf2 100644 --- a/gcc/testsuite/gcc.dg/pr51628-25.c +++ b/gcc/testsuite/gcc.dg/pr51628-25.c @@ -6,4 +6,4 @@ struct B { int i; }; struct C { struct B b; } __attribute__ ((packed)); long* g8 (struct C *p) { return p; } -/* { dg-warning "may may result in an unaligned pointer value" "" { target *-*-* } .-1 } */ +/* { dg-warning "may result in an unaligned pointer value" "" { target *-*-* } .-1 } */ -- 2.30.2