On Fri, Mar 02, 2012 at 03:11:21PM +1100, Bruce Evans wrote:
> >If we could add the returns_twice attribute to setjmp() then the
> >compiler makes sure all registers are dead before calling it and
> >jmp_buf wouldn't have to be that big.
> 
> I think compilers already do stuff like that automatically.  They have
> to for setjmp() to work.  Since there was no way to declare such
> attributes 20 years ago, compilers had to know that setjmp() was
> special and make it work when it only has a Standard C declaration
> (and some magic in its inmplementation).

It is an existing bug in FreeBSD that the *kernel* doesn't have such
attribution. Since it is using -ffreestanding, interference is
incorrect. LLVM recently moved the attribution logic from the LLVM
librarie into the C frontend where it belongs, but this does have the
negative side effect that it no longer magically fixes up issues for
-ffreestanding.

Joerg
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to