• 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
Re: typedef enums are now unsigned?!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: typedef enums are now unsigned?!


  • Subject: Re: typedef enums are now unsigned?!
  • From: Jason Stephenson <email@hidden>
  • Date: Sun, 08 Mar 2009 13:48:08 -0400

GCC has always behaved as described by the OP in my experience. It treats enums as unsigned unless you specifically create an enum member with a negative value. You can search the gcc mailing list and find discussions of this issue, all very similar to this discussion so far, going back to 2000, even earlier.

If this is a bug, then I don't think its an Apple-specific bug, but a bug in GCC. However, I don't think its a bug so much as a rather eccentric interpretation of the standard.

The other question is when should gcc adhere to which language standard? Unless you specify a standard with a switch, --std=c89 for instance, I don't think you can expect 100% standards conformance, after all, there are several C standards, as well as C++ and Objective-C. To which standard do you comply, unless its specified?

_______________________________________________
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


  • Follow-Ups:
    • Re: typedef enums are now unsigned?!
      • From: Jason Stephenson <email@hidden>
References: 
 >typedef enums are now unsigned?! (From: Nick Zitzmann <email@hidden>)
 >Re: typedef enums are now unsigned?! (From: Clark Cox <email@hidden>)
 >Re: typedef enums are now unsigned?! (From: Darcy Brockbank <email@hidden>)

  • Prev by Date: Re: typedef enums are now unsigned?!
  • Next by Date: Re: typedef enums are now unsigned?!
  • Previous by thread: Re: typedef enums are now unsigned?!
  • Next by thread: Re: typedef enums are now unsigned?!
  • Index(es):
    • Date
    • Thread