This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add fall-through comments


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]