• 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: Weird build error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird build error


  • Subject: Re: Weird build error
  • From: "Shawn Erickson" <email@hidden>
  • Date: Thu, 17 Apr 2008 16:59:16 -0700

On Thu, Apr 17, 2008 at 4:54 PM, Kyle Sluder
<email@hidden> wrote:
> GCC is alerting you to the fact that the switch at the end of the
>  statement is unnecessary.  If you really want to do something for all
>  cases, use default.  Otherwise just omit it.  Using the empty
>  statement (; by itself) will fool GCC, but an empty default case is
>  useless.

An "empty" default it informs the compiler that it is OK that not all
cases are handled (for example when an enum is used) which will avoid
warnings about missing cases when it really doesn't matter.

-Shawn
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Weird build error (From: Don Arnel <email@hidden>)
 >Re: Weird build error (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Re: Weird build error
  • Next by Date: Re: Weird build error
  • Previous by thread: Re: Weird build error
  • Next by thread: Re: Weird build error
  • Index(es):
    • Date
    • Thread