diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-11 16:31:44 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-11 16:31:44 +0000 |
commit | 6c17c071159c453d861c9b423ab6633e8bcab6a0 (patch) | |
tree | 27c1785e1bb01184081dad1d367630a12ee70fe0 | |
parent | 2500b12bc2859d3dd06b6f0fa9df385169688803 (diff) | |
download | gcc-6c17c071159c453d861c9b423ab6633e8bcab6a0.tar.gz |
* tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
packedness.
* g++.dg/ext/packed3.C: Add expected packed error.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109590 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/tree.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/packed3.C | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0680fed17ec..180c926b7ea 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index df59f5003de..96b461ce66f 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 202512cb0ec..efd6594e8ac 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +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 diff --git a/gcc/testsuite/g++.dg/ext/packed3.C b/gcc/testsuite/g++.dg/ext/packed3.C index 3494ff4c31e..880b5d9b469 100644 --- a/gcc/testsuite/g++.dg/ext/packed3.C +++ b/gcc/testsuite/g++.dg/ext/packed3.C @@ -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 } } } } |