linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* error: undefined identifier '__builtin_va_arg_pack'
@ 2013-07-18 12:47 Jeff Layton
  2013-07-18 15:36 ` [PATCH] sparse: add __builtin_va_arg_pack() and __builtin_va_arg_pack_len() Jeff Layton
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Layton @ 2013-07-18 12:47 UTC (permalink / raw)
  To: linux-sparse

I was running sparse on some code I maintain and saw a bunch of
warnings like this:

    /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>

It looks like gcc defines this in recent versions:

    http://gcc.gnu.org/onlinedocs/gcc/Constructing-Calls.html

It seems like something like this might do the trick for
__builtin_va_arg_pack_len:

-----------------[snip]------------------
diff --git a/lib.c b/lib.c
index 7e822eb..db981d8 100644
--- a/lib.c
+++ b/lib.c
@@ -779,6 +779,7 @@ void declare_builtin_functions(void)
 	add_pre_buffer("extern double __builtin_fabs(double);\n");
 	add_pre_buffer("extern void __sync_synchronize();\n");
 	add_pre_buffer("extern int __sync_bool_compare_and_swap(void *, ...);\n");
+	add_pre_buffer("extern size_t __builtin_va_arg_pack_len(void);\n");
 
 	/* Add Blackfin-specific stuff */
 	add_pre_buffer(
-----------------[snip]------------------

...but I'm unclear on how best to fix the errors around
__builtin_va_arg_pack since it doesn't seem to return a well-defined
type.

Thanks...
-- 
Jeff Layton <jlayton@redhat.com>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-24 16:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-18 12:47 error: undefined identifier '__builtin_va_arg_pack' Jeff Layton
2013-07-18 15:36 ` [PATCH] sparse: add __builtin_va_arg_pack() and __builtin_va_arg_pack_len() Jeff Layton
2013-07-19  2:49   ` Christopher Li
2013-07-19 10:33     ` [PATCH v2] " Jeff Layton
2013-07-24 16:41       ` 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).