There is no difference, it is only for readability. ->
has a higher priority than the link operator &
. See here .
To continue this proof, look at the breakdown of these lines:
Some short code
struct A {
int b;
};
int main() {
struct A *a;
int *c;
c = &a->b;
c = &(a->b);
return 1;
}
Dismantling both lines is equivalent to the following:
movq -16(%rbp), %rax
movq %rax, -8(%rbp)
Try the code here to see for yourself.
source
share