This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [committed] fixincludes: less va_list rewriting
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Mike Stump <mrs at apple dot com>
- Cc: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 29 Oct 2004 11:24:42 -0700
- Subject: Re: [committed] fixincludes: less va_list rewriting
- References: <FF615617-2954-11D9-AB47-000D9330C092@apple.com>
At Thu, 28 Oct 2004 19:48:22 -0700,
Mike Stump wrote:
>
> We can avoid rewriting va_list, if the file included <stdarg.h> or if
> there is some other form of protection.
This is wrong, or at least, too simplistic. The point of fixing
stdio.h is that it MUST NOT (in the RFC sense) define the symbol
'va_list', in strict C90/C99 mode. On the other hand, in strict
SuSv2 mode it MUST define that symbol. (Doncha love conflicting
standards?)
Bypassing on an include of stdarg.h, in the absence of any other
information, is going to disable this fix for just about everyone.
Your actual goal is, I presume, to get stdio.h not to be fixed on
Darwin. (Empirical testing indicates that Darwin stdio.h does get
this right, so we shouldn't be fixing it.) But _BSD_VA_LIST_ is
already in the set of symbols which are "taken to indicate that the
header knows what it's doing"... so I don't see why you need to mess
with this at all!
zw