aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2014-03-18 19:58:39 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2014-03-18 19:58:39 +0000
commit7485aeea44b120d4d64e85401f08d172426a81fe (patch)
treeb4e00677d0d99863e9ffc59c2a7b89222aec0546 /gcc
parentb318e4049b9e6083495f7b06ef3d3aa6175ac518 (diff)
downloadgcc-7485aeea44b120d4d64e85401f08d172426a81fe.zip
gcc-7485aeea44b120d4d64e85401f08d172426a81fe.tar.gz
gcc-7485aeea44b120d4d64e85401f08d172426a81fe.tar.bz2
re PR c/55383 (-Wcast-qual reports incorrect message)
2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c/55383 c/ * c-typeck.c: Use correct format string in cast-qual warning testsuite/ * c-c++-common/Wcast-qual-1.c: More precise match text. From-SVN: r208661
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c/ChangeLog5
-rw-r--r--gcc/c/c-typeck.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/c-c++-common/Wcast-qual-1.c4
4 files changed, 13 insertions, 3 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 9d854a7..b39b7d6 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/55383
+ * c-typeck.c: Use correct format string in cast-qual warning
+
2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
* c-decl.c (c_decl_attributes): Use
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 524a59f..0bfc12b 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -4855,7 +4855,7 @@ handle_warn_cast_qual (location_t loc, tree type, tree otype)
/* There are qualifiers present in IN_OTYPE that are not present
in IN_TYPE. */
warning_at (loc, OPT_Wcast_qual,
- "cast discards %q#v qualifier from pointer target type",
+ "cast discards %qv qualifier from pointer target type",
discarded);
if (added || discarded)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6eb795b..ffb6112 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/55383
+ * c-c++-common/Wcast-qual-1.c: More precise match text.
+
2014-03-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60305
diff --git a/gcc/testsuite/c-c++-common/Wcast-qual-1.c b/gcc/testsuite/c-c++-common/Wcast-qual-1.c
index 640e4f0..af80438 100644
--- a/gcc/testsuite/c-c++-common/Wcast-qual-1.c
+++ b/gcc/testsuite/c-c++-common/Wcast-qual-1.c
@@ -85,11 +85,11 @@ f3 (void ***bar)
void
f4 (void * const **bar)
{
- const void ***p9 = (const void ***) bar; /* { dg-warning "cast" } */
+ const void ***p9 = (const void ***) bar; /* { dg-warning "cast discards .const. qualifier " } */
void * const **p11 = (void * const **) bar;
void ** const *p13 = (void ** const *) bar; /* { dg-warning "cast" } */
const void * const **p15 = (const void * const **) bar; /* { dg-warning "cast" } */
- const void ** const *p17 = (const void ** const *) bar; /* { dg-warning "cast" } */
+ const void ** const *p17 = (const void ** const *) bar; /* { dg-warning "cast discards .const. qualifier" } */
void * const * const * p19 = (void * const * const *) bar;
const void * const * const *p21 = (const void * const * const *) bar;
}