This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: PR 9965
- From: Michael Matz <matz at suse dot de>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 7 Mar 2003 15:12:34 +0100 (CET)
- Subject: Re: C++ PATCH: PR 9965
Hi Mark,
On 6 Mar 2003, Mark Mitchell wrote:
> You're right. The interesting thing is that both of the new problems
> have actually been in existing code that was (apparently) exercised
> rarely.
>
> The compiler has two sets of conversion machinery, and we want to switch
> to the better version, and eliminate the worse version. Apparently the
> better version isn't monotonically better. :-(
With your later patch this is also fixed. But now a problem pops up in
mozilla, which can be reduced to this testcase:
------ snip --------
struct Base { virtual void v() = 0;};
struct Derived : public Base { void v(); };
const Derived f();
void g()
{
const Base & encoding = f();
}
------ snap --------
I believe this is the problem Jason was also describing. The anon
temporary that now is constructed can't be constructed, because it's an
abstract class. I'm not sure this is conforming code, but 3.3 branch from
some days ago did compile this, and it's excercised in mozilla.
Ciao,
Michael.