Re: Proper switching and casing.
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