https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66322

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
I think originally, the warning was supposed to catch things like

switch (n && MASK) {}

or even using the wrong variable in the switch(). Of course, it could be
smarter and avoid warning about the specific case 'switch(bool) {case true:
case false:}', which is what Linus says here:
https://lkml.org/lkml/2015/5/27/933

If only GCC had 1/100th of the developers of the Linux kernel... 

The manual and the warning text could also say explicitly the reason for
warning (something like "often indicates a typo")

Reply via email to