]> gcc.gnu.org Git - gcc.git/commitdiff
tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects packedness.
authorNathan Sidwell <nathan@codesourcery.com>
Wed, 11 Jan 2006 16:31:44 +0000 (16:31 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 11 Jan 2006 16:31:44 +0000 (16:31 +0000)
* 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

gcc/cp/ChangeLog
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/packed3.C

index 0680fed17ecc9402d61ef9dca9bfc50fb5339af4..180c926b7ea79754f8030b9db42d769925b83b97 100644 (file)
@@ -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
index df59f5003def9f60d6bcf9e1893ab4757c4e332d..96b461ce66fd4ab974a1a601b90871fe941eb1e0 100644 (file)
@@ -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
index 202512cb0ecd8ebfe5b14863ecee2b73bf5e5f7b..efd6594e8ac70e15e9d57e0c15f71e8f86366fc1 100644 (file)
@@ -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
index 3494ff4c31eeffac30baef82e7329b43386b3b2e..880b5d9b469249e29ebcb397b6406522c1774dee 100644 (file)
@@ -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 } } }
 }
This page took 0.112853 seconds and 5 git commands to generate.