This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ PATCH: sizeof(expr)


Mark Mitchell wrote:
> Please clarify the comment, or at least restore it.
Installed

nathan
-- 
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
        I have seen the death of PhotoShop -- it is called GIMP
nathan@acm.org  http://www.cs.bris.ac.uk/~nathan/  nathan@cs.bris.ac.uk
1999-09-15  Nathan Sidwell  <nathan@acm.org>

	* typeck.c (expr_sizeof): Reinstall and augment OFFSET_REF
	comment.
Index: cp/typeck.c
===================================================================
RCS file: /cvs/egcs/egcs/gcc/cp/typeck.c,v
retrieving revision 1.209
diff -c -3 -p -r1.209 typeck.c
*** typeck.c	1999/09/13 13:41:30	1.209
--- typeck.c	1999/09/15 08:57:21
*************** expr_sizeof (e)
*** 1610,1615 ****
--- 1610,1619 ----
        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);
  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]