This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc.c-torture/execute/stdarg-2.c: long vs int
- From: Jakub Jelinek <jakub at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 23 Aug 2005 09:09:21 +0200
- Subject: Re: gcc.c-torture/execute/stdarg-2.c: long vs int
- References: <200508230038.j7N0c1kU020768@greed.delorie.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Aug 22, 2005 at 08:38:01PM -0400, DJ Delorie wrote:
>
> This test assumes that integer constants passed as varargs are
> promoted to a type at least as big as "long", which is not valid on 16
> bit hosts. For example:
>
> void
> f1 (int i, ...)
> {
> va_start (gap, i);
> x = va_arg (gap, long);
>
>
> int
> main (void)
> {
> f1 (1, 79);
> if (x != 79)
> abort ();
>
>
> Shouldn't those constants be 79L, not just 79? That change fixes one
> m32c failure, but given that it's a test case I'm not going to make
> any assumptions about it.
This certainly wasn't my intention, please change it to 79L.
Jakub