This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: targetm.calls.promote_prototypes parameter
- From: Jason Merrill <jason at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: DJ Delorie <dj at redhat dot com>, kazu at gcc dot gnu dot org, Alexandre Oliva <aoliva at redhat dot com>, olegendo at gcc dot gnu dot org, gcc Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 6 Dec 2017 14:27:55 -0500
- Subject: Re: targetm.calls.promote_prototypes parameter
- Authentication-results: sourceware.org; auth=none
- References: <CADzB+2nQj0Khxg_t23yVaNdY=YpyKtqCB5LDjiSAJKqbfdCj9A@mail.gmail.com> <xno9nbby6q.fsf@greed.delorie.com> <20171206171415.GE2353@tucnak>
On Wed, Dec 6, 2017 at 12:14 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Dec 06, 2017 at 11:47:41AM -0500, DJ Delorie wrote:
>>
>> In my original proposal, I said this:
>>
>> > It includes a bunch of macro->hook conversions, mostly because the
>> > hooks need an additional parameter (the function) to detect which ones
>> > are Renesas ABI and which are GCC ABI.
>>
>> The original documentation at least hinted that the parameter was a
>> function type:
>>
>> > @deftypefn {Target Hook} bool TARGET_PROMOTE_PROTOTYPES (tree @var{fntype})
>>
>> Kazu's calls are in the C++ stuff, I don't know if g++ and Renesas C++
>> are compatible anyway (I doubt it), but that's what would be affected.
>> The original work was for C compatibility.
>
> The C FE seems to pass the fntype, while C++ FE seems to pass
> the type of the param.
I'm inclined to change the C++ FE to pass NULL_TREE instead until such
time as someone cares.
Jason