This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: __va_copy - for compatibility
- To: law at cygnus dot com
- Subject: Re: __va_copy - for compatibility
- From: Andreas Jaeger <aj at suse dot de>
- Date: 10 Dec 1999 16:40:18 +0100
- Cc: Geoff Keating <geoffk at ozemail dot com dot au>, gcc-patches at gcc dot gnu dot org
- References: <21291.943794507@upchuck>
>>>>> Jeffrey A Law writes:
Jeff> In message <u8d7sxlns8.fsf@gromit.rhein-neckar.de>you write:
>> That's a policy decision, since va_copy part of the new standard.
Jeff> But va_copy is not part of the old standard -- and thus va_copy violates
Jeff> the ANSI namespace.
>> Could this patch please be added - or a patch like the one below
>> that's checks for STDC? I prefer my first patch but leave it to
>> others to decide which patch should go in.
Jeff> I prefer your newer patch because it fixes up the namespace violations.
Fine. Are you going to add it? We need it for glibc. I'm appending
the patch again.
Andreas
1999-11-26 Andreas Jaeger <aj@suse.de>
* ginclude/stdarg.h (__va_copy): Add definition for compatibility
with previous GCC releases.
(va_copy): Define only if not STDC conformance is sought (va_copy
is part of ISO C99 but not of ISO C89).
============================================================
Index: ginclude/stdarg.h
--- ginclude/stdarg.h 1999/09/23 18:02:55 1.11
+++ ginclude/stdarg.h 1999/11/26 07:22:09
@@ -54,7 +54,10 @@
#define va_start(v,l) __builtin_stdarg_start(&(v),l)
#define va_end __builtin_va_end
#define va_arg __builtin_va_arg
+#ifndef __STDC__
#define va_copy(d,s) __builtin_va_copy(&(d),(s))
+#endif
+#define __va_copy(d,s) __builtin_va_copy(&(d),(s))
/* Define va_list, if desired, from __gnuc_va_list. */
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de