Commit dd42155e by Nathan Sidwell Committed by Nathan Sidwell

typeck.c (expr_sizeof): Reinstall and augment OFFSET_REF comment.

	* typeck.c (expr_sizeof): Reinstall and augment OFFSET_REF
	comment.

From-SVN: r29429
parent 7462a33f
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> 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* lex.c (cp_pragma_interface, cp_pragma_implementation): Copy * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
......
...@@ -1610,6 +1610,10 @@ expr_sizeof (e) ...@@ -1610,6 +1610,10 @@ expr_sizeof (e)
incomplete_type_error (e, TREE_TYPE (e)); incomplete_type_error (e, TREE_TYPE (e));
return size_int (1); 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) else if (TREE_CODE (e) == OFFSET_REF)
e = resolve_offset_ref (e); e = resolve_offset_ref (e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment