[cfe-dev] should -Wimplicit-fallthrough require C++11?
kremenek at apple.com
Fri Nov 9 17:55:37 PST 2012
In response to numerous internal complaints at Apple from C/Objective-C users, I've gone and disabled -Wimplicit-fallthrough when using straight C (not C++):
The motivation is that the attribute used to decorate a fall-through as explicit is only available when using C++11. This was particularly frustrating for C users.
I understand that change alone might be contentious, and obviously if there is serious concern that should be discussed. I'd like to one step further and ask whether or not this warning should even be on when using C++98? The same argument applies there as well; the attribute to decorate a fall-through as explicit is not available.
Indeed, I would have gone and restricted this warning to C++11, but apparently there is a test case specifically for the C++98 scenario:
There was a lot of discussion about this warning when it first went in Now that the warning is getting real living-on, I was wondering if we can discuss whether this is desired behavior? It feels somewhat dubious to me to have a warning like this that suggests adding an annotation when no such annotation is available.
More information about the cfe-dev