• 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: Missing braces? I don't see where
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing braces? I don't see where


  • Subject: Re: Missing braces? I don't see where
  • From: Wim Lewis <email@hidden>
  • Date: Tue, 27 Oct 2009 16:45:28 -0700


On Oct 27, 2009, at 3:42 PM, Jens Alfke wrote:
On Oct 27, 2009, at 3:36 PM, Chris Suter wrote:
In C you can specify which member you want to initialise, e.g.
static struct COLORDATA cd = { 0, false, { .rgb = { 0xffff, 0xffff, 0xffff } } };

I believe that's a GCC extension, not part of ANSI C. Or did they standardize it in C99? (If so, that would explain why it doesn't work in C++.)

It's a C99 thing. GCC also has an older, nonstandard syntax for that (using colons), which is obsolete now that there's a standard way to do it.


   http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/Designated-Inits.html


_______________________________________________ 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
References: 
 >Missing braces? I don't see where (From: Steve Mills <email@hidden>)
 >Re: Missing braces? I don't see where (From: Dan Korn <email@hidden>)
 >Re: Missing braces? I don't see where (From: Chris Suter <email@hidden>)
 >Re: Missing braces? I don't see where (From: Jens Alfke <email@hidden>)

  • Prev by Date: vDSP_vabs/vDSP_vabsD failure since Xcode 3.2 upgrade
  • Next by Date: Limiting application execution to specific OS version.
  • Previous by thread: Re: Missing braces? I don't see where
  • Next by thread: Re: Missing braces? I don't see where
  • Index(es):
    • Date
    • Thread