This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc.c-torture/execute/stdarg-2.c: long vs int
- From: DJ Delorie <dj at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 22 Aug 2005 20:38:01 -0400
- Subject: gcc.c-torture/execute/stdarg-2.c: long vs int
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.