[Bug c/14411] Request for setjmp/longjmp attributes

jsm at polyomino dot org dot uk gcc-bugzilla@gcc.gnu.org
Wed Mar 3 17:46:00 GMT 2004


------- Additional Comments From jsm at polyomino dot org dot uk  2004-03-03 17:46 -------
Subject: Re:  New: Request for setjmp/longjmp attributes

On Wed, 3 Mar 2004, avn at any dot ru wrote:

> While working on a project that uses a function with setjmp-like semantics, it 
> became necessary to supply the optimizer with such information. Otherwise, the 
> following code: 

Might such an attribute for setjmp be specifiable in a way making it
suitable for vfork as well?  special_function_p presently handles both the
same.  However, we want to get rid of this ad hoc handling and replace it
with proper attributes.  For ISO C functions these should be handled
through built-in functions in builtins.def.  (There may be a complication
because __builtin_setjmp does not correspond to the ISO C setjmp function,
and likewith __builtin_longjmp, so this cleanup should probably be
separated from the base patch that adds the attributes with testcases and
documentation.)  For non-ISO functions not in the reserved namespaces,
these should be handled through fixincludes: the correct attributes are
needed for correct compilation, so it isn't OK for them to be disabled in
ISO C mode.  (Since these functions involve types defined in headers, we
don't need to allow for users declaring them without including the
appropriate headers.)



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14411



More information about the Gcc-bugs mailing list