[cfe-commits] r76821 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/Sema.h lib/Sema/SemaDecl.cpp test/Sema/return.c test/SemaCXX/return.cpp test/SemaObjC/return.m

Mike Stump mrs at apple.com
Wed Jul 22 18:30:01 PDT 2009


On Jul 22, 2009, at 5:48 PM, Fariborz Jahanian wrote:
> Do you detect more common  cases of:
>
> int foo () { exit(0); }

#include <stdlib.h>

int foo () { exit(0); }

works for me just fine...  This manages to work for me because my  
system headers define exit with noreturn.

For:

void exit(int);

int foo () { exit(0); }

this doesn't yet work, as clang doesn't know about exit as a libc  
function (yet).  In gcc, exit is a builtin that is known to not  
return.  I'll see about adding it as a builtin.



More information about the cfe-commits mailing list