• 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
Why is C99 not enabled by default?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why is C99 not enabled by default?


  • Subject: Why is C99 not enabled by default?
  • From: Andrew Merenbach <email@hidden>
  • Date: Thu, 31 Jan 2008 09:57:44 -0800

Hi, all,

My question is per the subject of this e-mail: why is C99 not enabled by default in Objective-C projects? It seems more "modern," or at least more "convenient," what with the ability to declare variables in for-loops and whatnot. I've seen list postings that say that it's "fine" or "okay" to use C99 in Cocoa projects, without conflicts -- but *why* is never answered, from what I can tell.

One of the documentation files has the following:
Imagine that you are working on a C program under Xcode. During development, you learn that the program must be portable to systems that support only pre-C99 language compliance, both GNU and non-GNU compilers. As a result, your code cannot contain C99-specific language features.

Because the default standard tool build uses the GNU89 language dialect, you are confident that your code will work well under these compilers. Unfortunately, this is not the case. For example, imagine your code base contains variable-length automatic arrays, as shown in Listing 3.


So I might infer that the lack of default C99 compliance is for compatible, multi-platform C code. Is that the case?



Cheers, Andrew _______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: NSViewController and IB -- what am I missing?
  • Next by Date: re: Best way to get warnings for 10.5 only calls?
  • Previous by thread: NSViewController and IB -- what am I missing?
  • Next by thread: Debugging threads and hanging issue
  • Index(es):
    • Date
    • Thread