[cfe-dev] Bug with -O4

Robert Purves listrp at gmail.com
Tue Apr 28 00:48:26 PDT 2009


I'm not sure what I expect -O4 to do, but clang's response was a  
surprise.

$ cat test.c
int main( void ) { return 0; }
$ gcc test.c -O4
$ llvm-gcc-4.2 test.c -O4
$ clang test.c -O4
ld warning: in /var/folders/88/88AKX+F62RWmd++8ZOxBkU+++TI/-Tmp-/cc- 
NuzMfl.o, file is not of required architecture
Undefined symbols:
   "_main", referenced from:
       start in crt1.10.5.o
ld: symbol(s) not found


Robert P.




More information about the cfe-dev mailing list