aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>1999-09-15 08:58:51 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>1999-09-15 08:58:51 +0000
commitdd42155e21d3471bc2d95bf26eb99ad782413d82 (patch)
tree61af3714797220fce0c8df6495b6d06277f31979
parent7462a33f04715b04ec28f825d4c83b6182c793bb (diff)
downloadgcc-dd42155e21d3471bc2d95bf26eb99ad782413d82.zip
gcc-dd42155e21d3471bc2d95bf26eb99ad782413d82.tar.gz
gcc-dd42155e21d3471bc2d95bf26eb99ad782413d82.tar.bz2
typeck.c (expr_sizeof): Reinstall and augment OFFSET_REF comment.
* typeck.c (expr_sizeof): Reinstall and augment OFFSET_REF comment. From-SVN: r29429
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/typeck.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 40d0fbf..f6fbcd6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+1999-09-15 Nathan Sidwell <nathan@acm.org>
+
+ * typeck.c (expr_sizeof): Reinstall and augment OFFSET_REF
+ comment.
+
1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 13d1f35..cb024af 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -1610,6 +1610,10 @@ expr_sizeof (e)
incomplete_type_error (e, TREE_TYPE (e));
return size_int (1);
}
+ /* It's illegal to say `sizeof (X::i)' for `i' a non-static data
+ member unless you're in a non-static member of X. But, we used
+ to support this usage, so we still permit it unless we're being
+ pedantic. [expr.prim] */
else if (TREE_CODE (e) == OFFSET_REF)
e = resolve_offset_ref (e);