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