aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/preprocessor
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-31 22:42:06 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-09-01 08:41:17 +0200
commit53480c6b455437397fd9c9666429e305f93865c5 (patch)
tree58f0c39da3e39d7b9384e8f74404341e889d2f6d /validation/preprocessor
parentb77f1a1fdcc43279996e79b27357a08f69db8e90 (diff)
downloadsparse-dev-53480c6b455437397fd9c9666429e305f93865c5.tar.gz
has-attr: add support for __has_attribute()
Sparse has support for a subset of GCC's large collection of attributes. It's not easy to know which versions support this or that attribute. However, since GCC5 there is a good solution to this problem: the magic macro __has_attribute(<name>) which evaluates to 1 if <name> is an attribute known to the compiler and 0 otherwise. Add support for this __has_attribute() macro by extending the already existing support for __has_builtin(). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/preprocessor')
-rw-r--r--validation/preprocessor/has-attribute.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/preprocessor/has-attribute.c b/validation/preprocessor/has-attribute.c
index ec8dbb06..3149cbfa 100644
--- a/validation/preprocessor/has-attribute.c
+++ b/validation/preprocessor/has-attribute.c
@@ -44,7 +44,6 @@ __has_attribute()??? Quesako?
/*
* check-name: has-attribute
* check-command: sparse -E $file
- * check-known-to-fail
*
* check-output-start