* [PATCH] sparse: Add 'artifical' to ignore attributes
@ 2011-06-19 16:20 Pekka Enberg
2011-06-20 17:36 ` Christopher Li
0 siblings, 1 reply; 2+ messages in thread
From: Pekka Enberg @ 2011-06-19 16:20 UTC (permalink / raw)
To: sparse; +Cc: linux-sparse, 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:
/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 <penberg@kernel.org>
---
ident-list.h | 1 +
parse.c | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ident-list.h b/ident-list.h
index b94aece..b12d172 100644
--- a/ident-list.h
+++ b/ident-list.h
@@ -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
diff --git a/parse.c b/parse.c
index 537055f..bcee794 100644
--- a/parse.c
+++ b/parse.c
@@ -486,6 +486,8 @@ const char *ignored_attributes[] = {
"__alloc_size__",
"always_inline",
"__always_inline__",
+ "artificial",
+ "__artificial__",
"bounded",
"__bounded__",
"cdecl",
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sparse: Add 'artifical' to ignore attributes
2011-06-19 16:20 [PATCH] sparse: Add 'artifical' to ignore attributes Pekka Enberg
@ 2011-06-20 17:36 ` Christopher Li
0 siblings, 0 replies; 2+ messages in thread
From: Christopher Li @ 2011-06-20 17:36 UTC (permalink / raw)
To: Pekka Enberg; +Cc: linux-sparse
On Sun, Jun 19, 2011 at 9:20 AM, Pekka Enberg <penberg@kernel.org> wrote:
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-20 17:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-19 16:20 [PATCH] sparse: Add 'artifical' to ignore attributes Pekka Enberg
2011-06-20 17:36 ` Christopher Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).