Add fall-through comments

Paul Eggert eggert@cs.ucla.edu
Tue Feb 12 05:35:00 GMT 2019


Joseph Myers wrote:
> This patch adds fall-through comments in some cases where -Wextra
> produces implicit-fallthrough warnings.

Thanks, I checked the files in question and these changes all look good to me.

For what it's worth, in Gnulib we use 'FALLTHROUGH;' for this sort of thing, 
defined as:

# if __GNUC__ < 7
#  define FALLTHROUGH ((void) 0)
# else
#  define FALLTHROUGH __attribute__ ((__fallthrough__))
# endif

the idea being that this is a bit more robust than a comment.



More information about the Libc-alpha mailing list