This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Bootstrap failure (Re: [Patch] Java: Prepare for %q, %< and %> in diagnostic messages)
- From: Andrew Haley <aph at redhat dot com>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>, java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, rmathew at gmail dot com
- Date: Wed, 6 Oct 2004 14:28:12 +0100
- Subject: Re: Bootstrap failure (Re: [Patch] Java: Prepare for %q, %< and %> in diagnostic messages)
- References: <200410052010.WAA13716@faui1m.informatik.uni-erlangen.de><84fc9c000410060556636a27cf@mail.gmail.com>
Richard Guenther writes:
> On Tue, 5 Oct 2004 22:10:26 +0200 (CEST), Ulrich Weigand
> <weigand@i1.informatik.uni-erlangen.de> wrote:
> > Hello,
> >
> > this causes bootstrap failure on s390(x) and presumably all other
> > platforms where va_list is an array type.
> >
> > Note that if va_list is an array type, it decays to a pointer
> > when used a formal parameter like here:
> > >@@ -3141,7 +3143,7 @@ issue_warning_error_from_context (
> > >+ const char *msgid, va_list ap)
> >
> > and thus &ap does *not* have type va_list *, so this assignment
> > >+ text.args_ptr = ≈
> > fails due to type mismatch.
>
> Uh, can you do this? Take an address of a va_list object?
It says in 7.15 "va_list is an object type". So, you can take its
address and later dereference to get an lvalue that is a va_list.
> Wouldn't it be more "correct" to have text.args_ptr be of type
> va_list and use va_copy instead?
That does sound like a better idea, yes.
Andrew.