Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sure, &foo->bar looks like foo + offsetof(struct thingity, bar), but there is no pointer arithmetic involved since C doesn't specify how the member access ( -> or . ) is actually calculated.

It does however specify that [] operator is equivalent to pointer arithmetic. But we are talking ->,. operators and not [].



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: