[clang] [Clang] Add -Wimplicit-fallthrough to -Wextra for GCC compatibility (PR #149474)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 18 08:31:56 PDT 2025


erichkeane wrote:

I did a dive through the history here.  It seems that the 'hold up' historically is the 'flex' project using the comment-based form.  I agree with historical discussions that recognizing comments here is silly, and we should not do it.

That said, I'm generally in favor of this patch.  Having this in `-Wextra` is a good idea.  I personally could argue to add it to `-Wall` but I'm a bit of a curmudgeon about the 'we don't wanna change our code' attitude.

IMO, I have little sympathy for Flex's argument, and would be ok with merging this anyway (and folks who have to care about it, have to deal with it).  That said, if a patch went to Flex to convert them to some form of the `add a FALLTHROUGH macro defined to the right thing`, I think it makes objections a nothingburger.


https://github.com/llvm/llvm-project/pull/149474


More information about the cfe-commits mailing list