From 05766405881a4ca092a2075382858c9848552d6c Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Fri, 28 May 2004 16:37:47 -0700 Subject: [PATCH] [PATCH] more fun with sparse This adds __builtin_memset(), __builtin_stdarg_start() and recognition of __attribute__((pure)) and __attribute__((always_inline))? Another thing that is probably worth doing is shifting add_pre_buffer() of #define __i386__ 1 to target.c, seeing that it is obviouslty target-dependent ;-) --- check.c | 1 + lib.c | 1 + parse.c | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/check.c b/check.c index a1ebc547..a9a2b3ba 100644 --- a/check.c +++ b/check.c @@ -42,6 +42,7 @@ int main(int argc, char **argv) add_pre_buffer("#define __CHECKER__ 1\n"); add_pre_buffer("extern void *__builtin_memcpy(void *, const void *, unsigned long);\n"); add_pre_buffer("extern void * __builtin_return_address(int);\n"); + add_pre_buffer("extern void __builtin_memset(void *, int, unsigned long);\n"); args = argv; for (;;) { diff --git a/lib.c b/lib.c index 0aeb965b..e20289d3 100644 --- a/lib.c +++ b/lib.c @@ -645,6 +645,7 @@ void create_builtin_stream(void) add_pre_buffer("#define __extension__\n"); add_pre_buffer("#define __pragma__\n"); add_pre_buffer("#define __builtin_stdarg_start(a,b) ((a) = (__builtin_va_list)(&(b)))\n"); + add_pre_buffer("#define __builtin_va_start(a,b) ((a) = (__builtin_va_list)(&(b)))\n"); add_pre_buffer("#define __builtin_va_arg(arg,type) ((type)0)\n"); add_pre_buffer("#define __builtin_va_end(arg)\n"); } diff --git a/parse.c b/parse.c index 6de7ed67..25ba2678 100644 --- a/parse.c +++ b/parse.c @@ -287,6 +287,10 @@ static const char * handle_attribute(struct ctype *ctype, struct ident *attribut return NULL; if (match_string_ident(attribute, "alias")) return NULL; + if (match_string_ident(attribute, "pure")) + return NULL; + if (match_string_ident(attribute, "always_inline")) + return NULL; return "unknown attribute"; } -- 2.11.4.GIT