From patchwork Sun Jun 19 16:20:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pekka Enberg X-Patchwork-Id: 894902 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5JGU5bQ020783 for ; Sun, 19 Jun 2011 16:30:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751482Ab1FSQaE (ORCPT ); Sun, 19 Jun 2011 12:30:04 -0400 Received: from filtteri6.pp.htv.fi ([213.243.153.189]:57758 "EHLO filtteri6.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751564Ab1FSQaE (ORCPT ); Sun, 19 Jun 2011 12:30:04 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 19 Jun 2011 16:30:05 +0000 (UTC) X-Greylist: delayed 548 seconds by postgrey-1.27 at vger.kernel.org; Sun, 19 Jun 2011 12:30:04 EDT Received: from localhost (localhost [127.0.0.1]) by filtteri6.pp.htv.fi (Postfix) with ESMTP id F19F956E1C8; Sun, 19 Jun 2011 19:20:53 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp5.welho.com ([213.243.153.39]) by localhost (filtteri6.pp.htv.fi [213.243.153.189]) (amavisd-new, port 10024) with ESMTP id LYH9qkJHsJel; Sun, 19 Jun 2011 19:20:53 +0300 (EEST) Received: from localhost.localdomain (cs181148025.pp.htv.fi [82.181.148.25]) by smtp5.welho.com (Postfix) with ESMTP id 8CF4B5BC003; Sun, 19 Jun 2011 19:20:53 +0300 (EEST) From: Pekka Enberg To: sparse@chrisli.org Cc: linux-sparse@vger.kernel.org, Pekka Enberg Subject: [PATCH] sparse: Add 'artifical' to ignore attributes Date: Sun, 19 Jun 2011 19:20:51 +0300 Message-Id: <1308500451-22637-1-git-send-email-penberg@kernel.org> X-Mailer: git-send-email 1.7.4.1 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org 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 --- 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",