diff options
| author | Jeff Layton <jlayton@redhat.com> | 2013-07-19 06:33:40 -0400 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2013-07-25 04:32:07 -0700 |
| commit | 5aa922d3919897481c8e65d9603ffc55e551fc19 (patch) | |
| tree | 5bb38471d1bea711696261551bce676fa6a2d530 /validation | |
| parent | 5a3bd40c1e9976c0896ad2d198e202a515dcf194 (diff) | |
| download | sparse-dev-5aa922d3919897481c8e65d9603ffc55e551fc19.tar.gz | |
sparse: add __builtin_va_arg_pack() and __builtin_va_arg_pack_len()
this patch stops sparse from complaining about them not being defined:
/usr/include/bits/stdio2.h:98:25: error: undefined identifier '__builtin_va_arg_pack'
/usr/include/bits/stdio2.h:98:25: error: not a function <noident>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/builtin_va_arg_pack.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/validation/builtin_va_arg_pack.c b/validation/builtin_va_arg_pack.c new file mode 100644 index 00000000..3426b86b --- /dev/null +++ b/validation/builtin_va_arg_pack.c @@ -0,0 +1,20 @@ +extern void v(int a, ...); + +extern inline __attribute__((__always_inline__)) void f(int a, ...) +{ + __SIZE_TYPE__ b = __builtin_va_arg_pack_len(); +} + +extern inline __attribute__((__always_inline__)) void g(int a, ...) +{ + v(a, __builtin_va_arg_pack()); +} + +static void h(void) +{ + f(0, 0); + g(0, 0); +} +/* + * check-name: __builtin_va_arg_pack() + */ |
