This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: mips address+symbol issue.
Erik Trulsson <ertr1013@student.uu.se> writes:
> Remember that a[i] is just syntactic sugar for *(a+i).
Actually it is (*((a)+(i))).
> This means that the expression a[i-2000000000L] is the same as
> *(a+i-2000000000L).
(*((a)+(i-2000000000L)))
> With i==2000000000L, this becomes *(a+2000000000L-2000000000L)
(*((a)+(2000000000L-2000000000L)))
> which is the same as *((a+2000000000L)-2000000000L).
(*((a)+(0)))
All expressions are perfectly valid.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."