[dpdk-dev] [RFC] use Gcc/Clang fallthrough attribute
Bruce Richardson
bruce.richardson at intel.com
Tue Nov 12 11:02:39 CET 2019
On Mon, Nov 11, 2019 at 11:28:03AM -0800, Stephen Hemminger wrote:
> Use an explicit statement fallthrough attibute, rather than relying on
> having correct fallthrough comments (that match the magic set of regex
> which depends on the value of compiler flags). This is more robust and
> safer.
>
> Introduces __rte_fallthrough and fixes existing code to use it.
>
> Motivated after seeing recent travis build failures.
I wonder how much safer this actually is? The comments to be used are well
documented in the GCC documentation so it's not that hard to pick one that
works well and standardize on that. Overall I think I prefer the comments,
as I find the use of a macro ugly when flagging something like this.
/Bruce
More information about the dev
mailing list