c99 and 10.2
c99 and 10.2
- Subject: c99 and 10.2
- From: Timothy Ritchey <email@hidden>
- Date: Thu, 29 Aug 2002 16:19:43 -0500
I was messing around with some code under PB in Jag and stumbled across
the fact that this now works:
int main() {
Foo* f = [[Foo alloc] init];
NSLog(@"%@", f);
Bar *b = [[Bar alloc] init];
}
So, just for kicks I tried:
int main() {
Foo* f = [[Foo alloc] init];
for(int i = 0; i < 10; ++i) {
...
}
}
and got an error saying I was outside of c99 mode. I added:
-std=c99
as a flag to gcc, and the for loop initialization worked. I got some
warnings about precompiled headers no longer working, but otherwise
everything functioned as advertised. Is this safe to use? Being an old
<cough>C++</cough> hack, I would sure like the convenience.
Cheers,
tim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.