Operator precedence and struct definition in C
- by Yktula
struct struct0 {
int a;
};
struct struct1 {
struct struct0 structure0;
int b;
} rho;
&rho->structure0; /* Reference 1 */
(struct struct0 *)rho; /* Reference 2 */
(struct struct0)rho; /* Reference 3 */
From reference 1, does the compiler take the address of rho, and then access structure0, or vice-versa?
What does the line at reference 2 do?
Since structure0 is the first member of struct1, would reference 3 be equivalent to reference 1?