diff options
author | Robert Lipe <robertl@gcc.gnu.org> | 1998-06-02 20:00:24 +0000 |
---|---|---|
committer | Robert Lipe <robertl@gcc.gnu.org> | 1998-06-02 20:00:24 +0000 |
commit | 7e2fbe9340640221252951d84b6c0fa28d740971 (patch) | |
tree | 0b1bd410c16dde5fd8b07734dffb33aaffe80c07 /gcc | |
parent | 72f8240e7a6684438d0cf59e060ce95672d355fb (diff) | |
download | gcc-7e2fbe9340640221252951d84b6c0fa28d740971.zip gcc-7e2fbe9340640221252951d84b6c0fa28d740971.tar.gz gcc-7e2fbe9340640221252951d84b6c0fa28d740971.tar.bz2 |
Corrections, per Martin.
From-SVN: r20189
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.robertl/eb22.C | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C index b2d6ab6..bfe513b 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C @@ -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 |