Commit 758333d5 by Nathan Sidwell Committed by Nathan Sidwell

tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects packedness.

	* tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
	packedness.

	* g++.dg/ext/packed3.C: Add expected packed error.

From-SVN: r109590
parent 167c295d
2006-01-11 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
packedness.
2006-01-06 Gabriel Dos Reis <gdr@integrablesolutions.net>
* parser.c (cp_parser_primary_expression): Document the grammar
......
......@@ -87,9 +87,6 @@ lvalue_p_1 (tree ref,
case COMPONENT_REF:
op1_lvalue_kind = lvalue_p_1 (TREE_OPERAND (ref, 0),
treat_class_rvalues_as_lvalues);
/* In an expression of the form "X.Y", the packed-ness of the
expression does not depend on "X". */
op1_lvalue_kind &= ~clk_packed;
/* Look at the member designator. */
if (!op1_lvalue_kind
/* The "field" can be a FUNCTION_DECL or an OVERLOAD in some
......
2006-01-11 Nathan Sidwell <nathan@codesourcery.com>
* g++.dg/ext/packed3.C: Add expected packed error.
2006-01-11 Hans-Peter Nilsson <hp@axis.com>
PR target/25706
......@@ -20,6 +20,6 @@ struct __attribute__ ((packed)) Packed
void Foo (Packed &p)
{
Ref (p.i); // { dg-error "cannot bind packed field" "" { target { ! default_packed } } }
Ref (p.u.i);
Ref (p.u.i); // { dg-error "cannot bind packed field" "" { target { ! default_packed } } }
Ref (p.u); // { dg-error "cannot bind packed field" "" { target { ! default_packed } } }
}
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