On 8/30/2012 12:32 PM, Kirilenko wrote:
>
> I was reading the C11 standard (?6.5.2.1) :
>
>> The definition of the subscript operator [] is that E1[E2] is identical to
>> (*((E1)+(E2))).
>
> I would like to know why are brackets around E1 necessary (they were missing
> in the C89 standard), ie in which case can (*(E1+(E2))) be different from
> (*((E1)+(E2))) ?
They're not necessary. They were added (way back in C99!) in response to a
comment from the UK that it would be clearer that way.
--
Larry Jones
I obey the letter of the law, if not the spirit. -- Calvin