Re: Weird build error
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