]> The Tcpdump Group git mirrors - tcpdump/commit
Check for __attribute__ ((fallthrough)) (GCC 7).
authorDenis Ovsienko <[email protected]>
Fri, 21 Jul 2017 21:04:15 +0000 (22:04 +0100)
committerDenis Ovsienko <[email protected]>
Sat, 22 Jul 2017 18:33:49 +0000 (19:33 +0100)
commit6df678ca315946ed6190bc8fe0a80f3c36d246c4
treebf24ecf12b3f7a8c9255f229ba956ccc0554f854
parent11fcafcf6928d793411ae3dba9af324e3d027bb2
Check for __attribute__ ((fallthrough)) (GCC 7).

The documentation claims that recent GCC is now better by default at
spotting cases of code flow falling through (which is true) and that it
avoids false positives by matching nearby source code comments with
regexps. However, the latter feature doesn't seem to work as reliably
as the manual describes it, so let's have a macro for this purpose.

Tested to work on:
* x86_64, Fedora 26, GCC 7.1.1 (w/__attribute__, w/fallthrough)
* x86_64, Ubuntu 16.04, GCC 5.4.0 (w/__attribute__, w/o fallthrough)
* x86_64, FreeBSD 11.0, CLang 3.8.0 (w/__attribute__, w/o fallthrough)
* SPARC, Solaris 10, SolStudio 12.4 (w/__attribute__, w/o fallthrough)
* SPARC, Solaris 10, SunStudio 11 (w/o __attribute__)
aclocal.m4
config.h.in
configure
configure.in
netdissect-stdinc.h