]> gcc.gnu.org Git - gcc.git/commitdiff
re PR c++/13932 (duplicate warning message for conversion)
authorMark Mitchell <mark@codesourcery.com>
Thu, 5 Feb 2004 05:22:21 +0000 (05:22 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 5 Feb 2004 05:22:21 +0000 (05:22 +0000)
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

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/conv2.C [new file with mode: 0644]

index 083bebe540d4657e72814f74046d498509e67135..be3315eef966ab8fbf70f9ca5885d46da09c7802 100644 (file)
@@ -1,3 +1,12 @@
+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
index 0aa19f126432d57ab7d3a4d5e3a5707ad83f8d25..e6eded59addb25a84a5f7a18ee4925b7956ac620 100644 (file)
@@ -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:
index 4f635cc7b556dc98e876b01356ff07ce54e67742..c6d273a6170a2f19f6698c77b1cd8b0aa492d0a0 100644 (file)
@@ -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)
     {
index 6c3db3e87af43edaadcc034aeaf20db4f2745c96..df3236f6f4c77057c311deca46ec1c2e4856c074 100644 (file)
@@ -1,3 +1,8 @@
+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
diff --git a/gcc/testsuite/g++.dg/warn/conv2.C b/gcc/testsuite/g++.dg/warn/conv2.C
new file mode 100644 (file)
index 0000000..e346600
--- /dev/null
@@ -0,0 +1,3 @@
+// PR c++/13932
+
+int i = 1.; // { dg-warning "converting" }
This page took 0.118598 seconds and 5 git commands to generate.