[cfe-commits] r141803 - in /cfe/trunk: include/clang/Basic/Builtins.def include/clang/Basic/Builtins.h lib/AST/DeclPrinter.cpp lib/CodeGen/CGCall.cpp lib/Sema/SemaDecl.cpp test/Analysis/security-syntax-checks.m test/CodeGen/function-attributes.c

Joerg Sonnenberger joerg at britannica.bec.de
Sun Oct 16 10:09:46 PDT 2011

On Sat, Oct 15, 2011 at 12:02:13AM -0400, Rafael EspĂ­ndola wrote:
> > The savectx "builtin" creates warning regressions for NetBSD and
> > supposedly the other BSDs. I can't find any source for savectx and
> > qsetjmp with google -- at least savectx was originally questioned when
> > it was added in LLVM. Does anywhere know a system where they do exist?
> > Otherwise I would advocate to just remove them from the list.
> The waring is because is because the declarations are not matching. It
> looks like you found a system with savectx :-), what is the signature?
> Can you update Builtins.def?

void savectx(struct pcb *);

Does that sound like anything with a relation to setjmp? Even if it
returns twice, it can and should be marked as such. I still don't
believe it belongs on any magic builtin list.

> If you are sure that savectx doesn't return twice, please check with
> the gcc folks too. They have the equivalent code since 1992 at least:
> http://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=66d433c7be147672fb1da1afd42a311d79cb0531

I don't believe in cargo cult programming, so this doesn't exactly sound
like a good reason for keeping it.

> What does savectx do on your system?

It's an internal function, used to synchronise some data structure
before creating a new thread, exposed to userland for various (slightly
broken...) reasons.


More information about the cfe-commits mailing list