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
parent b318e404
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
......
......@@ -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)
......
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
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment