This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: targetm.calls.promote_prototypes parameter
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jason Merrill <jason 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 20:30:10 +0100
- 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> <CADzB+2=CCtS-wX5_dY4hi8V8cjrU5H6FCpt23eYOapTWHgQpkA@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Dec 06, 2017 at 02:27:55PM -0500, Jason Merrill wrote:
> 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.
Well, in PR82897 I had a potential use for it, but one of the obstackles was
that when the C++ FE calls these the function type isn't around.
Jakub