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] Add sorry() when mangling CALL_EXPR


Mike Stump <mrs@apple.com> wrote:

>> this patch adds a sorry() when write_expression meets a CALL_EXPR.
>> Since this is a defect in the C++ ABI, we currently have no way to mangle
>> correctly such an expression.

> If we did this for everything that was inconsistent or missing from the
> C++ language as g++ (and the standard) was being developed, users would
> not like the product.  :-(
>
> I'd hope that we can pester the abi group (Mark?  Jason?) and have them
> invent something, put it up on their web site, and then we can just do
> it.  Now, while it is fresh in our minds, is a great time to do this.
>
> Failing that, I think this might be reasonable to do, that way, we can
> change (fix) the abi, and not change it.

I understand and I agree with you that the issue should be tackled as soon
as possible. Actually, I think that Mark is probably going to rise the issue
on the ABI mailing list soon-ish, given what I read in the answers of the
gcc@ thread.

But the point is that GCC is currently segfaulting (with no error message)
with the attacched testcode. I made my own testcase, but we have at least 2
opened PRs which make GCC crash exactly for this. I firmly believe that
sorry() is better than a segfault, even from an user standpoint, no matter
what. Especially if it gives to the user a little clue about what GCC/ABI
can't handle.

Giovanni Bajo


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