https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84470
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- When p is null p->a is not valid if it's evaluated. offsetof (along with sizeof and alignof and the like) don't evaluate their operands so they are exempt.