This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]