Re: load/store address overflow on binutils 2.14

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chip Coldwell wrote:
[snip]
> >         printf("%016x\n", ~a);
> > 
> >         return 0;
> > }
> > 
> > outputs
> > 
> > 00000000ffffffff
> > 
> > on my i386-linux system.
> 
> Strangely, this is actually "correct" behavior.  Arguments on
> variable-length argument lists are implicitly "promoted" to unsigned
> int at the widest.  See K&R 2nd ed. A6.1 and A7.3.2.

Ugh. Thanks for pointing this out. I wasn't aware of it.

	printf("%016Lx\n", ~a);

Produces the expected output. So it is actually an implementation
bug in binutils, which isn't fixable for 2.14 and earlier, because
those have to remain at K&R C level. The K&R requirement was only
recenly loosened.


Thiemo


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux