Corrections, per Martin.
authorRobert Lipe <robertl@gcc.gnu.org>
Tue, 2 Jun 1998 20:00:24 +0000 (20:00 +0000)
committerRobert Lipe <robertl@gcc.gnu.org>
Tue, 2 Jun 1998 20:00:24 +0000 (20:00 +0000)
From-SVN: r20189

gcc/testsuite/g++.old-deja/g++.robertl/eb22.C

index b2d6ab6413910ae918a2dd866f8447bea46d7d62..bfe513b46db82f0b867d628cd19e0f49c353d763 100644 (file)
@@ -1,5 +1,7 @@
-// Build don't link:  
-// XFAIL, doesn't.
+// Ambiguous conversion, three candidates:
+// builtin == (int, int), and the two user-defined operators
+// Each one requires a user-defined ICS where another uses builtin conversions,
+// so none is the best viable function.
 
 class MyInt
 {
@@ -9,16 +11,16 @@ public:
 };
 
 bool operator==(const MyInt& a, const int& b)
-{
+{                                               // ERROR - candidate
         return (int)a == b;
 }
 
 bool operator==(const MyInt& a, const MyInt& b)
-{
+{                                               // ERROR - candidate
         return (int)a == (int)b;
 }
 
 bool f()
 {
-        return 3 == MyInt();
-}
+  return 3 == MyInt();                          // ERROR - ambiguous
+}                                               // ERROR - no return value