The attached test case has 2 code branches (#ifdef BREAKME and #ifndef BREAKME) that are treated as identical in all prior gcc versions.
4.3 snapshots barf with:
gcc-4.3-testcase.cpp: In function 'int main()':
gcc-4.3-testcase.cpp:28: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
gcc-4.3-testcase.cpp:14: note: candidate 1: bool operator==(const junk&, const char*)
gcc-4.3-testcase.cpp:7: note: candidate 2: bool junk::operator==(const foo&) const
since even in the BREAKME version, no implicit casting is involved, I tend to think older gcc versions are right.
Created attachment 14184 [details]
Add test case
I can't reproduce the problem with current (128551) mainline. Likely a transient issue, otherwise, please reopen.