[cfe-dev] should -Wimplicit-fallthrough require C++11?

Chris Lattner clattner at apple.com
Mon Nov 12 09:47:38 PST 2012


On Nov 12, 2012, at 9:21 AM, David Blaikie <dblaikie at gmail.com> wrote:

>> I can certainly imagine someone coming up with this rule, but I can't imagine myself ever agreeing that it's the right thing to do :)
>> 
>> Copy-and-pasting code is not, in my opinion, a reasonable way to silence a warning. We need something better; __fallthrough would be fine by me.
> 
> For my 2c: This warning was only added because we had a way to
> annotate. In contexts where there is no such annotation the warning
> doesn't really meet Clang's bar. Rather than forcing people to turn
> this warning off depending on what they are compiling I think it makes
> sense for it to be a no-op in any language variant where we don't
> currently have an annotation mechanism.
> 
> (this means, imho, for the 3.2 release, we should do as Ted started &
> have this disabled in both C and C++98 - unless someone's going to
> whip up the annotation device necessary for those languages in very
> short order (yes, I realize we've still got weeks until 3.2 actually
> releases, but I don't see sufficient benefit to rushing through such a
> change))

I completely agree - that's the right thing for the 3.2 release.

-Chris



More information about the cfe-dev mailing list