This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc.c-torture/execute/stdarg-2.c: long vs int


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]