From 292ca82722c3d79c0d5bd514132b69e86f3365c2 Mon Sep 17 00:00:00 2001 From: jason Date: Thu, 31 Oct 2002 18:57:39 +0000 Subject: [PATCH] restore old comment git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58687 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/typeck.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 9b4fbf6..55b6dbd 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -1969,8 +1969,11 @@ build_class_member_access_expr (tree object, tree member, my_friendly_assert (object != error_mark_node, 20020801); } - - /* Issue a warning about access a member of a NULL object. */ + + /* 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", -- 2.7.4