[PATCH v3] Use fallthrough attribute

Mark Wielaard mark@klomp.org
Sat Feb 10 02:26:00 GMT 2018


Hi Joshua,

On Fri, Feb 09, 2018 at 10:27:18AM -0600, Joshua Watt wrote:
> Use __attribute__ ((fallthrough)) to indicate switch case fall through
> instead of a comment. This ensure that the fallthrough warning is not
> triggered even if the file is pre-processed (hence stripping the
> comments) before it is compiled.
> 
> The actual fallback implementation is hidden behind a FALLBACK macro in
> case the compiler doesn't support it.
> 
> Finally, the -Wimplict-fallthrough warning was upgraded to only allow
> the attribute to satisfy it; a comment alone is no longer sufficient.

Thanks, this look good.
I added ChangeLog entries and pushed it to master.

Cheers,

Mark



More information about the Elfutils-devel mailing list