sparse: Add 'artifical' to ignore attributes
PATCH 1/1 sparse: Add 'artifical' to ignore attributes
This patch adds the 'artifical' GCC attribute to list of ignore attributes. It's an attribute that's used by glibc which causes the following bogus sparse warnings when using it for userspace projects:
/usr/include/bits/stdlib.h:37:1: error: attribute '__artificial__': unknown attribute /usr/include/bits/stdlib.h:64:1: error: attribute '__artificial__': unknown attribute
Signed-off-by Pekka Enberg <[email protected]>
--- ident-list.h | 1 + parse.c | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-)
ident-list.h +1 -0
@@ -87,6 +87,7 @@ IDENT(fastcall); IDENT(__fastcall__);IDENT (dllimport);IDENT (__dllimport__);IDENT (dllexport);IDENT (__dllexport__);IDENT (restrict);IDENT (__restrict); +IDENT (artificial);IDENT (__artificial__);/* Preprocessor idents. Direct use of __IDENT avoids mentioning the keyword * itself by name, preventing these tokens from expanding when compiling
parse.c +2 -0
@@ -486,6 +486,8 @@ const char *ignored_attributes[] = {"__alloc_size__" ,"always_inline" ,"__always_inline__" , +"artificial" , +"__artificial__" ,"bounded" ,"__bounded__" , "cdecl",
Signature · 1 line
1.7.4.1
Christopher Li
maintainerQuoted 3 lines · Pekka Enberg
This patch adds the 'artifical' GCC attribute to list of ignore attributes. It's an attribute that's used by glibc which causes the following bogus sparse warnings when using it for userspace projects:
Thanks for the patch. It looks good. Will apply.
Chris