restore old comment
authorJason Merrill <jason@gcc.gnu.org>
Thu, 31 Oct 2002 18:57:39 +0000 (13:57 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 31 Oct 2002 18:57:39 +0000 (13:57 -0500)
From-SVN: r58687

gcc/cp/typeck.c

index 9b4fbf600e8ccbe77d9d2752b694d5c56f213711..55b6dbda87c5a954d246ec3fba2b08494b735a84 100644 (file)
@@ -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",