• 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: Proper switching and casing.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proper switching and casing.


  • Subject: Re: Proper switching and casing.
  • From: Greg Parker <email@hidden>
  • Date: Thu, 09 Apr 2015 15:00:49 -0700

> On Apr 9, 2015, at 2:10 PM, Sean McBride <email@hidden> wrote:
>
>> On Thu, 9 Apr 2015 17:05:57 -0400, Alex Zavatone said:
>>
>> Sorry that I sent this before the main observation.
>>
>> Considering the implications of this, should Xcode's compiler flag these
>> "unbreak-ed case statements" with a warning?   Currently, it doesn't do that.
>
> -Wimplict-fallthrough

Note that -Wimplicit-fallthrough only works you are compiling C++ or Objective-C++ with C++11 support. The warning does nothing in non-C++ and older C++ code.

The problem is that you need some way to suppress the warning for deliberate fall-through. C++11 has [[clang::fallthrough]] syntax but non-C++ and older C++ can't use that.


--
Greg Parker     email@hidden     Runtime Wrangler



_______________________________________________

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: 
 >Proper switching and casing. (From: Alex Zavatone <email@hidden>)
 >Re: Proper switching and casing. (From: Alex Zavatone <email@hidden>)
 >Re: Proper switching and casing. (From: Sean McBride <email@hidden>)

  • Prev by Date: Re: Proper switching and casing.
  • Next by Date: iOS App Store Version vs Info.plist version?
  • Previous by thread: Re: Proper switching and casing.
  • Next by thread: Re: Proper switching and casing.
  • Index(es):
    • Date
    • Thread