• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
c99 and 10.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: OpenPlay on 10.2
  • Next by Date: Renaming source files
  • Previous by thread: Update to Jaguar Dev Tools available
  • Next by thread: Renaming source files
  • Index(es):
    • Date
    • Thread