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: PATCH: "Fix" PR C++/9729


Hi,

> PR c++/9729 is a C++ regression -- of sorts.  What happenned is that a
> bug in the G++ 3.2 ABI can cause multiple conversion operators to get
> the same mangled name.  I introduced an assert for that -- but I
> should have really introduced an error message.
> 
> So, this patch causes us to issue the error message.
> 
> There exist programs that compiled -- to bogus output -- with GCC 3.2
> that will now trigger this error.  This isn't really a regression --
> it's better to warn the user that their code won't work the way they
> expect.
> 
> The ABI bug has long since been fixed with -fabi-version=0, but no fix
> is possible that preserves the G++ 3.2 ABI.

As original submitter or the PR, my code is affected, and I have further
questions :

the error message is triggered even for code which ABI is not affected by
the bug.  The proof of this is the test-suite program you committed : it
doesn't even instantiate anything, so it can't possibly cause any ABI bug,
but you still reject it for a potential problem.

I tried to instantiate the code of the test-case to produce the ABI bug
with g++ 3.2 and was not successful.  The original code from the PR didn't
show any ABI bug as well with g++ 3.2.

The problem I see is that your error message will reject code which worked
fine with the 3.2 ABI, preventing people from using the old ABI, so it's a
problem because somehow it hinders the work done to produce a stable ABI for
g++.

So, is it possible to narrow the check for this bug to the exact situation
where the bug occurs ?  If not, I would suggest to change the error to
a warning only.

Is it possible to have this check for 3.2.3 as well ?

Another related question : will the default ABI of g++ 3.3 be the same as
3.2 ?

-- 
Sylvain


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