public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/google/grte/v5-2.27/master] Add clang placeholders for va_arg_pack
@ 2021-08-28  0:36 Fangrui Song
  0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-08-28  0:36 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bc79ff3412e33f8c014404ad177ac6545fc0e13d

commit bc79ff3412e33f8c014404ad177ac6545fc0e13d
Author: Stan Shebs <stanshebs@google.com>
Date:   Mon Jan 22 12:30:55 2018 -0800

    Add clang placeholders for va_arg_pack

Diff:
---
 misc/sys/cdefs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index af103fdb8a..61deb03df1 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -354,9 +354,14 @@
 /* GCC 4.3 and above allow passing all anonymous arguments of an
    __extern_always_inline function to some other vararg function.  */
 #if __GNUC_PREREQ (4,3)
+#if defined(__clang__)
+# define __va_arg_pack() __VA_ARGS__
+# define __va_arg_pack_len() 0
+#else
 # define __va_arg_pack() __builtin_va_arg_pack ()
 # define __va_arg_pack_len() __builtin_va_arg_pack_len ()
 #endif
+#endif
 
 /* It is possible to compile containing GCC extensions even if GCC is
    run in pedantic mode if the uses are carefully marked using the


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-28  0:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28  0:36 [glibc/google/grte/v5-2.27/master] Add clang placeholders for va_arg_pack Fangrui Song

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 read-only IMAP folder(s) and NNTP newsgroup(s).