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
This commit is contained in:
parent
cff5cdc83d
commit
25abc0a5ef
7 changed files with 19 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
|
||||
|
||||
* 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.
|
||||
|
||||
2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
|
||||
|
||||
* g++.old-deja/g++.jason/conversion5.C: Adjust option.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-do assemble }
|
||||
// 981203 bkoz
|
||||
// g++/16077
|
||||
// { dg-options "-Wconversion" }
|
||||
|
||||
class nicaragua;
|
||||
struct colombia {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do assemble }
|
||||
// { dg-options "-Wconversion" }
|
||||
//
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 5 May 2001 <nathan@codesourcery.com>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do assemble }
|
||||
// { dg-options "-Wconversion" }
|
||||
// Test that we resolve this case as mandated by the standard, but also
|
||||
// warn about it. We choose op char* not because it is a member of B --
|
||||
// the standard says that all conversion ops are treated as coming from
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do run }
|
||||
// { dg-options "-Wconversion" }
|
||||
extern "C" void abort();
|
||||
|
||||
struct A {
|
||||
|
|
Loading…
Add table
Reference in a new issue