About the array subtype operator

Quote from the C11 standard:

Array substring (§ 6.5.2.1)

The definition of an index operator []is that which is E1[E2]identical (*((E1)+(E2))).

I would like to know why parentheses are needed around E1(they were not in the C89 standard), i.e. in which expression may (*(E1+(E2)))be different from (*((E1)+(E2)))?

+5
source share
1 answer

According to http://www.open-std.org/jtc1/sc22/wg14/www/docs/n841.htm , it is inserted for clarity only. These two expressions are syntactically equivalent.

PC-UK0103
1.
: /
: 6.3.2.1
Title:
:

2 "(*(E1+(E2)))" "(*((E1)+(E2)))",    . , ,   , 2 .

+9

All Articles