This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Transaction fix: New target hook special_function_flags
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 14 Oct 2013 13:30:59 +0200
- Subject: Re: [PATCH] Transaction fix: New target hook special_function_flags
- Authentication-results: sourceware.org; auth=none
- References: <20131011170244 dot GA7694 at bart> <CAFiYyc2DHS_S9nBCDCgCaFXWK=MUrJCqvsLA9838CO0SCM+Psw at mail dot gmail dot com> <20131014101452 dot GI30970 at tucnak dot zalov dot cz> <525BD3BE dot 30305 at linux dot vnet dot ibm dot com> <CAFiYyc3hMEL+5bc90SP73zS5dq8xha3-KX3ho-qBH3AasKCDtA at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Oct 14, 2013 at 01:26:25PM +0200, Richard Biener wrote:
> > I somehow couldn't get it working with the add_builtin_function parameter. Perhaps because these
> > attrs are supposed to be translated into the respective tree flags (DECL_IS_RETURNS_TWICE) at that
> > point already?!
>
> Yes, via handle_..._attribute.
?? If add_builtin_function last argument is non-NULL, it will call
decl_attributes with that argument and thus should set up evertyhing.
So, IMHO:
tree noreturn = tree_cons (get_identifier ("noreturn"), NULL, NULL);
tree returns_twice = tree_cons (get_identifier ("returns_twice"), NULL, NULL);
and passing either of those to add_builtin_function should IMHO work just
fine.
Jakub