Re: [PATCH 1/2] Compiler Attributes: add support for __fallthrough (gcc >= 7.1)

From: Luc Van Oostenryck
Date: Mon Oct 22 2018 - 08:07:12 EST

On Sun, Oct 21, 2018 at 07:14:13PM +0200, Miguel Ojeda wrote:
> While comment parsing is a good idea to deal with old codebases
> that used such a comment as documentation for humans, the best
> solution is to use the attribute:
> * It is a "real" part of the AST (=> better for tooling).

This will create a problem for the recent versions of sparse which
support __has_attribute() because sparse falsely pretends to support
this attribute while, to play nice with -Wdeclaration-after-statement,
it needs some adaptation to the parsing (it's actually seen not as a
statement but as a declaration). I'll see to fix it this evening.

-- Luc