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: [PATCH] Transaction fix: New target hook special_function_flags


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


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