<br><br><div class="gmail_quote">On Sat, Nov 10, 2012 at 7:41 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Fri, Nov 9, 2012 at 8:15 PM, Ted Kremenek <<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>> wrote:<br>
> On Nov 9, 2012, at 7:04 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
><br>
> The original intention was that the warning could be used in any<br>
> language mode, if you wanted a warning on *all* switch fallthrough,<br>
> and that people who didn't want that could just not turn it on.<br>
><br>
><br>
> Right.<br>
><br>
> I<br>
> guess the complaints you're receiving are for situations where the<br>
> warning can't simply be disabled (or not enabled in the first place)?<br>
><br>
><br>
> What has happened is that a fair number of users have discovered this<br>
> warning using -Weverything.  When they first discover it they find it<br>
> interesting.  After they discover that they cannot add an annotation (as the<br>
> warning suggests) they get very frustrated.  They are then left with the<br>
> choice of just turning the warning off, or using pragmas.  For those users<br>
> who like the warning in principle, but find that they cannot use it in<br>
> practice because of these limitations (because they are not using C++11)<br>
> they view it is an incomplete feature.  Several people have thus requested<br>
> to not see the warning at all.<br>
<br>
If you're using -Weverything, shouldn't the expectation be that you'll<br>
end up turning off several warnings?<br>
<br></blockquote><div><br>Yes, it is. Whilst turning warnings has usually been a "white-listing" operation, -Weverything turns it into a "black-listing" operation. However the concern here is that people rarely, if ever, reevaluate the warnings they turn on/off (at least, not until they hit a bug and wonder if it could have gotten caught). Therefore, by having everyone use `-Wno-implicit-fallthrough` there is a risk that the warning will become useless... even after people switch from C++03 to C++11.<br>
<br>-- Matthieu<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
><br>
> If we really can't find a better solution for these people than<br>
> disabling the warning in languages where we can't annotate<br>
> fallthrough, then we should do so consistently and disable it in C++98<br>
> too.<br>
><br>
><br>
> Agreed, but I like your suggestion of using something like a builtin.  Right<br>
> now this warnings feels like an incomplete feature.  It has a really great<br>
> workflow in C++11 with the use of the attribute.  Otherwise, unless the user<br>
> wants a zero-tolerance policy with this warning, the workflow is not great.<br>
> What I am afraid of is people turning this warning off (either directly or<br>
> by never turning it on) when they may have found it useful.  Once they make<br>
> that decision, it is unlikely they will give the warning a second try.<br>
><br>
> You may have noticed that I reverted my change, pending further discussion<br>
> here.  I still think we should consider what to do for the LLVM 3.2 branch,<br>
> in case this doesn't get enough attention before then.  I myself won't have<br>
> any cycles over the weekend to look at this.  A builtin, however, doesn't<br>
> sound so hard to implement, but I'd prefer some way to sugar coat this to<br>
> avoid the ugly syntax.<br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
><br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br>