• 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:57:37 -0400

However, this program shows that what I just said may be inaccurate:

#include <stdio.h>

typedef enum {
    Missing = 0,
    Present = 1
} TestEnum;

int main (int argc, char **argv)
{
    TestEnum bob;
    bob = Missing;
    printf("%i\n", bob);
    bob = -1;
    printf("%i\n", bob);

    return 0;
}

When built with -arch x86_64, it prints 0, -1. Ditto when built for i386.


Jason _______________________________________________ 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>
    • Re: typedef enums are now unsigned?!
      • From: Jean-Daniel Dupas <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>)
 >Re: typedef enums are now unsigned?! (From: Jason Stephenson <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