gcc

Why can’t get warning information when returning address of local variable use gcc?

There are two functions, max1() and max2(): int* max1() { int a; int b; return &a; } int* max2() { int a; int b; return a > b ? &a : &b; } We can get warning information when compile max1() use gcc: king@king:~/temp$ gcc test1.c test1.c: In function ‘int* max()’: test1.c:6:9: warning: address of local variable ‘a’ returned [-Wreturn-local-addr]…
Read more

Can’t compile objective c in linux

I’m trying to get into objective c, but I don’t have a mac so I am trying to get it to work on linux. I found these two articles which talk about compiling objective c on linux: this one and this one Ok, I forgot to say that I don’t want to use gnustep, it seems dead and I don’t…
Read more