[cfe-dev] -Wall not catching unused variables

Robert Purves listrp at gmail.com
Wed Jul 15 22:59:21 PDT 2009


$ cat test.c
int main( void )
{
   int silly;
   return 0;
}
$ clang test.c -Wall
$ gcc test.c -Wall
test.c: In function 'main':
test.c:3: warning: unused variable 'silly'
$ clang --version
clang version 1.0 (http://llvm.org/svn/llvm-project/cfe/trunk 75893)
Target: i386-apple-darwin9
Thread model: posix

Robert P.




More information about the cfe-dev mailing list