delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/06/25/03:26:45

Date: Mon, 19 Jun 2000 20:17:48 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Laurynas Biveinis <lauras AT softhome DOT net>
cc: DJGPP Workers <djgpp-workers AT delorie DOT com>
Subject: Re: Patch: new GCC builtins for stdarg.h/varargs.h
In-Reply-To: <394E3ECE.8D7A4DD7@softhome.net>
Message-ID: <Pine.SUN.3.91.1000619200929.28843A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 19 Jun 2000, Laurynas Biveinis wrote:

> Eli Zaretskii wrote:
> > va_copy was invented by C99, right?  And GCC didn't support C99 before
> > v2.96, right?  
> 
> Not exactly. GCC 2.96 isn't the key version when talking about C99. 

We were talking about va_copy, not C99 in general, as far as its support 
in GCC goes.  It is true that va_copy is supported by GCC builtins in 
2.96 only, is it?

> > So there's nothing wrong if we don't support va_copy with
> > versions of GCC before 2.96.
> 
> Currently there's nothing wrong. But when we start adding C99
> features, it will become wrong.

What will become wrong?

We don't intend to support C99 features that require compiler support, 
unless the version of the compiler in use actually does provide that 
support, do we?

Since va_copy requires a special feature of the compiler, we can require 
that the compiler be new enough, for va_copy to be supported.  People who 
use older compilers won't have va_copy, just like they don't today.

> I still do not understand, why va_copy is binded with GCC 2.96.

Because you told that earlier versions don't support a builtin that is 
required for va_copy.

> I think I'll just test
> trivial non-builtin va_copy implementation, if it works - 
> it would be the best way to end discussion ;)

If you can run the trivial implementation via some test suite that proves 
that it indeed works, then I agree.

Perhaps it might be a good idea to ask the GCC maintainers whether your 
trivial implementation has some pitfalls.

> > va_list and va_arg are different: they are in C90, and DJGPP supported
> > them from day one.
> 
> The only difference I see is standard version. I should be missing
> something here.

The point is that introducing a new feature without compiler support is 
different from continued support for an old feature that is proven to 
work with old compilers.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019