OSDN Git Service

* c-typeck.c (build_unary_op): Replace unreachable diagnostic for
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 Nov 2004 00:31:55 +0000 (00:31 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 Nov 2004 00:31:55 +0000 (00:31 +0000)
taking address of bit-field by assertion.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90216 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-typeck.c

index ed17a6b..5a004d5 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-07  Joseph S. Myers  <joseph@codesourcery.com>
+
+       * c-typeck.c (build_unary_op): Replace unreachable diagnostic for
+       taking address of bit-field by assertion.
+
 2004-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/s390/s390.md (attribute "op_type"): Default to "NN".
 2004-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/s390/s390.md (attribute "op_type"): Default to "NN".
index cf883b7..f9481f8 100644 (file)
@@ -2655,13 +2655,8 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
       if (!c_mark_addressable (arg))
        return error_mark_node;
 
       if (!c_mark_addressable (arg))
        return error_mark_node;
 
-      if (TREE_CODE (arg) == COMPONENT_REF
-         && DECL_C_BIT_FIELD (TREE_OPERAND (arg, 1)))
-       {
-         error ("attempt to take address of bit-field structure member %qD",
-                TREE_OPERAND (arg, 1));
-         return error_mark_node;
-       }
+      gcc_assert (TREE_CODE (arg) != COMPONENT_REF
+                 || !DECL_C_BIT_FIELD (TREE_OPERAND (arg, 1)));
 
       argtype = build_pointer_type (argtype);
 
 
       argtype = build_pointer_type (argtype);