C++ PATCH: PR 21987
Mark Mitchell
mark@codesourcery.com
Tue Jun 14 16:57:00 GMT 2005
When I backported my patch for PR c++/21336 to the 3.4 branch, I
missed one line: an important test of warn_conversion. That caused
g++.dg/warn/conversion-function-1.C to fail.
I was clearly sloppy in testing this patch; shan't happen again.
Tested on x86_64-unknown-linux-gnu, applied on the 3.4 branch.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2005-06-14 Mark Mitchell <mark@codesourcery.com>
PR c++/21987
* decl.c (grok_op_properties): Add missing warn_conversion check.
Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1174.2.35
diff -c -5 -p -r1.1174.2.35 decl.c
*** decl.c 3 Jun 2005 16:29:25 -0000 1.1174.2.35
--- decl.c 14 Jun 2005 16:52:03 -0000
*************** grok_op_properties (tree decl, bool comp
*** 9131,9140 ****
--- 9131,9141 ----
return ok;
/* Warn about conversion operators that will never be used. */
if (IDENTIFIER_TYPENAME_P (name)
&& ! DECL_TEMPLATE_INFO (decl)
+ && warn_conversion
/* Warn only declaring the function; there is no need to
warn again about out-of-class definitions. */
&& class_type == current_class_type)
{
tree t = TREE_TYPE (name);
More information about the Gcc-patches
mailing list