version = 3.3.2, i386-linux
cp/typeck.c has this:
/* Complain about other invalid uses of offsetof, even though
they will
give the right answer. Note that we complain whether or not they
actually used the offsetof macro, since there's no way to know at
this
point. So we just give a warning, instead of a pedwarn. */
if (null_object_p && CLASSTYPE_NON_POD_P (object_type))
{
warning ("invalid access to non-static data member `%D' of NULL
object",
member);
warning ("(perhaps the `offsetof' macro was used incorrectly)");
}
No doubt there's a language citation for why this exists,
but I wonder if you guys would be amenable to adding an option
to turn this check off.