Albert ARIBAUD <albert.aribaud@xxxxxxxxxxxx> writes: > Granted, the way the condition is written is not valid, as the > evaluation will be done left to right, causing a dereference of g > before testing it against NULL -- the right order should be "(g==NULL) > || (g->a==0)", with short-circuit ensuring g->a is only evaluated if g > != NULL. Once the compiler successfully evaluates g->a == 0, it knows that g != NULL. If g == NULL, then the evaluation of g->a will crash. So there is no need for the compiler to test g == NULL, since it will never be true. This is a feature, not a bug. See -fdelete-null-pointer-checks. Ian