This is the mail archive of the
mailing list for the binutils project.
Re: mips address+symbol issue.
Erik Trulsson wrote:
Remember that a[i] is just syntactic sugar for *(a+i).
I don't think that's right, I think the intention is that
a[i] is syntactic sugar for *(a+(i)). Nothing else makes
sense. For example you would be saying that you could
not have a subscript of the form x[a==b] since it would
mean *((x+a) == b). That just can't be right.
To me the quoted program is clearly correct, and if it
does not work, it's a compiler bug.
Note that your interpretation would also mean that
x = 11;
.. = a[x-2];
would be undefined, and that seems equally implausible.