aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2002-10-31 13:57:39 -0500
committerJason Merrill <jason@gcc.gnu.org>2002-10-31 13:57:39 -0500
commit3b5b4904ec790d4312b124f9e4e46b92a2458875 (patch)
tree123ba39676d3428ebdde25b39b107f51f7d37c87
parentb8d5baff92c8aec09cd88723103683d7f3591abb (diff)
downloadgcc-3b5b4904ec790d4312b124f9e4e46b92a2458875.zip
gcc-3b5b4904ec790d4312b124f9e4e46b92a2458875.tar.gz
gcc-3b5b4904ec790d4312b124f9e4e46b92a2458875.tar.bz2
restore old comment
From-SVN: r58687
-rw-r--r--gcc/cp/typeck.c7
1 files 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",