cp/
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 21 Jun 2003 17:39:58 +0000 (17:39 +0000)
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 21 Jun 2003 17:39:58 +0000 (17:39 +0000)
        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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68312 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.benjamin/16077.C
gcc/testsuite/g++.old-deja/g++.other/conv7.C
gcc/testsuite/g++.old-deja/g++.other/overcnv2.C
gcc/testsuite/g++.old-deja/g++.other/overload14.C

index 0e679c9..7809040 100644 (file)
@@ -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.
index 48e3642..bb1ad5b 100644 (file)
@@ -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))
index a947a8f..4e3c4cf 100644 (file)
@@ -1,5 +1,12 @@
 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.
        * g++.old-deja/g++.bugs/900215_01.C: Likewise.
 
index edffef2..9f854b5 100644 (file)
@@ -1,6 +1,7 @@
 // { dg-do assemble  }
 // 981203 bkoz
 // g++/16077
+// { dg-options "-Wconversion" }
 
 class nicaragua;
 struct colombia {
index 71ec204..7042e14 100644 (file)
@@ -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>
index ab877d1..ef9c1f7 100644 (file)
@@ -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
index 28d5f47..2a50b1b 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-options "-Wconversion" }
 extern "C" void abort();
 
 struct A {