| To: | Chip Coldwell <coldwell@frank.harvard.edu> |
|---|---|
| Subject: | Re: load/store address overflow on binutils 2.14 |
| From: | Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de> |
| Date: | Sun, 10 Aug 2003 16:54:25 +0200 |
| Cc: | linux-mips@linux-mips.org |
| In-reply-to: | <Pine.LNX.4.44.0308101032240.16702-100000@frank.harvard.edu> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <20030810120844.GB22977@rembrandt.csv.ica.uni-stuttgart.de> <Pine.LNX.4.44.0308101032240.16702-100000@frank.harvard.edu> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.4i |
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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: load/store address overflow on binutils 2.14, Chip Coldwell |
|---|---|
| Next by Date: | Re: load/store address overflow on binutils 2.14, Maciej W. Rozycki |
| Previous by Thread: | Re: load/store address overflow on binutils 2.14, Chip Coldwell |
| Next by Thread: | Re: load/store address overflow on binutils 2.14, Maciej W. Rozycki |
| Indexes: | [Date] [Thread] [Top] [All Lists] |