diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-10-22 00:54:08 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-10-26 12:02:48 +0200 |
commit | 36477322d06817191639c0d4b12b67dc64352757 (patch) | |
tree | a6fb9c5db1215aa04cf1ee1cc2539ee1569409c8 | |
parent | 3a53a9e392904b67680b8d4cd47acaf7934bfd16 (diff) | |
download | sparse-36477322d06817191639c0d4b12b67dc64352757.tar.gz |
__attribute__((fallthrough)) can't simply be ignored
Currently, sparse has the attribute 'fallthrough' in its list of
known-but-ignored attributes (like almost every GCC's attributes).
But this attribute is a statement attribute, something which is
currently not supported (it's interpreted as the attribute of an empty
declaration which doesn't play well with -Wdeclaration-after-statement).
Fix this by stopping to consider this attribute as known. This will
allow __has_attribute(fallthrough) to correctly play its role.
Note: a more complete solution will need to parse this statement
attribute and maybe be able to make the distinction between
statement attributes, label attributes (also currently ignored),
and type, function & variable attributes.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | gcc-attr-list.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/gcc-attr-list.h b/gcc-attr-list.h index 9acb982f..ae0b611f 100644 --- a/gcc-attr-list.h +++ b/gcc-attr-list.h @@ -47,7 +47,6 @@ GCC_ATTR(error) GCC_ATTR(exception) GCC_ATTR(exception_handler) GCC_ATTR(externally_visible) -GCC_ATTR(fallthrough) GCC_ATTR(far) GCC_ATTR(fast_interrupt) GCC_ATTR(fastcall) |