Commit f583e452 by Mark Mitchell Committed by Mark Mitchell

re PR c++/13932 (duplicate warning message for conversion)

	PR c++/13932
	* call.c (convert_like_real): Use "converting" rather than
	"argument" as the descriptive keyword to
	dubious_conversion_warnings.
	* typeck.c (convert_for_assignment): Do not call
	dubious_conversion_warnings.

	PR c++/13932
	* g++.dg/warn/conv2.C: New test.

From-SVN: r77297
parent bfa21a28
2004-02-04 Mark Mitchell <mark@codesourcery.com>
PR c++/13932
* call.c (convert_like_real): Use "converting" rather than
"argument" as the descriptive keyword to
dubious_conversion_warnings.
* typeck.c (convert_for_assignment): Do not call
dubious_conversion_warnings.
2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/13086
......
......@@ -3900,7 +3900,7 @@ convert_like_real (tree convs, tree expr, tree fn, int argnum, int inner,
if (issue_conversion_warnings)
expr = dubious_conversion_warnings
(totype, expr, "argument", fn, argnum);
(totype, expr, "converting", fn, argnum);
switch (TREE_CODE (convs))
{
case USER_CONV:
......
......@@ -5642,8 +5642,6 @@ convert_for_assignment (tree type, tree rhs,
if (TREE_CODE (rhs) == TREE_LIST && TREE_VALUE (rhs) == error_mark_node)
return error_mark_node;
rhs = dubious_conversion_warnings (type, rhs, errtype, fndecl, parmnum);
/* The RHS of an assignment cannot have void type. */
if (coder == VOID_TYPE)
{
......
2004-02-04 Mark Mitchell <mark@codesourcery.com>
PR c++/13932
* g++.dg/warn/conv2.C: New test.
2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/13086
......
// PR c++/13932
int i = 1.; // { dg-warning "converting" }
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