aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@integrable-solutions.net>2003-06-21 17:39:58 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2003-06-21 17:39:58 +0000
commit25abc0a5efa834a9a39d44f942d3bc3cc5480771 (patch)
tree32fb950e73559984b72a7c2f099244e64b51366a /gcc/cp
parentcff5cdc83d920e0ea10209a764649c6abc011804 (diff)
downloadgcc-25abc0a5efa834a9a39d44f942d3bc3cc5480771.zip
gcc-25abc0a5efa834a9a39d44f942d3bc3cc5480771.tar.gz
gcc-25abc0a5efa834a9a39d44f942d3bc3cc5480771.tar.bz2
re PR c++/10784 (Warning about choosing custom operator over copy constructor cannot be turned off (and it's useless in the first place))
cp/ PR c++/10784 * call.c (joust): Warn about choosing conversion sequence only if -Wconversion. testsuite/ * g++.old-deja/g++.benjamin/16077.C: Add -Wconversion option. * g++.old-deja/g++.other/conv7.C: Likewise * g++.old-deja/g++.other/overcnv2.C: Likewise. * g++.old-deja/g++.other/overload14.C: Likewise. From-SVN: r68312
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/call.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0e679c9..7809040 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,6 +1,12 @@
+2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ PR c++/10784
+ * call.c (joust): Warn about choosing conversion sequence only if
+ -Wconversion.
+
2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
- PC c++/10864
+ PR c++/10864
* call.c (op_error): Tidy.
* error.c (dump_expr): Properly format 'T()' when T is an
aggregate type.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 48e3642..bb1ad5b 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -5807,7 +5807,7 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn)
if (!give_warning)
/*NOP*/;
- else if (warn)
+ else if (warn && warn_conversion)
{
tree source = source_type (TREE_VEC_ELT (w->convs, 0));
if (! DECL_CONSTRUCTOR_P (w->fn))