OSDN Git Service

* typeck.c (expr_sizeof): Reinstall and augment OFFSET_REF
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Sep 1999 08:58:51 +0000 (08:58 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Sep 1999 08:58:51 +0000 (08:58 +0000)
comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29429 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/typeck.c

index 40d0fbf..f6fbcd6 100644 (file)
@@ -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
index 13d1f35..cb024af 100644 (file)
@@ -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);