This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the EGCS project.
Re: Some patches for the C/C++ frontends
- To: Bernd Schmidt <bernds@cygnus.co.uk>
- Subject: Re: Some patches for the C/C++ frontends
- From: Jason Merrill <jason@cygnus.com>
- Date: 16 Jul 1999 13:00:15 -0700
- Cc: egcs-patches@egcs.cygnus.com
- References: <Pine.LNX.4.10.9907132232160.17130-100000@biriani.cygnus.co.uk>
- Resent-To: egcs-patches@egcs.cygnus.com
>>>>> Bernd Schmidt <bernds@cygnus.co.uk> writes:
> - The C++ frontend apparently uses a different prototype for
> __builtin_apply. Resolved by using the C one, as that one seems
> correct. Does __builtin_apply work at all for C++? If not, there's no
> point in declaring it.
I would expect it to work the same way it does for C. The C version is
almost certainly correct.
> - __builtin_return has a small difference: the function type is passed
> through build_exception_variant in the C++ frontend. This difference
> is not present in the patch; if necessary, it can be resolved by moving
> this builtin out of the common code.
That call tells the compiler that the function will never throw an
exception. I don't know why it would be done for __builtin_return, which
doesn't involve a call. This could reasonably be done to builtins which
do get called, though.
This change is fine.
> - The C frontend allows some functions (abort, exit, _exit) to be
> called with any parameters. The C++ frontend is more strict about the
> correct prototype. This behaviour is preserved with the patch.
Good.
> - The C++ frontend wants to set DECL_BUILT_IN_NONANSI for abort and exit.
> It's not clear why. The behaviour is preserved with the patch.
I dunno. Try removing that difference and see if anything breaks.
> - The C++ frontend passes NULL_PTR as last argument when building
> builtin_fsqrt, the C frontend passes "sqrt". Not sure whether that has
> a purpose (no comments to that effect); I used the C version.
> Likewise for memset.
That seems correct.
> - The C++ frontend doesn't know __builtin_trap. I didn't change that yet.
Please do. I imagine this is just a sync failure.
Jason