It's not clear to me that this will match any of the patterns suppressing gcc's -Wimplicit-fallthrough warning (note that level -Wimplicit-fallthrough=3 is the default and that the regexpr must match the entire comment). Perhaps you want to add another /* -fallthough */ comment?