c-typeck.c (build_unary_op): Replace unreachable diagnostic for taking address of...
authorJoseph Myers <joseph@codesourcery.com>
Sun, 7 Nov 2004 00:31:55 +0000 (00:31 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sun, 7 Nov 2004 00:31:55 +0000 (00:31 +0000)
* c-typeck.c (build_unary_op): Replace unreachable diagnostic for
taking address of bit-field by assertion.

From-SVN: r90216

gcc/ChangeLog
gcc/c-typeck.c

index ed17a6b5b0dddfa8cb3e7b617104819e1bf056e2..5a004d507d935a7c5b2a4986df176bab0d9abe4c 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".
index cf883b7d545040a0745948115232d27994eed1bc..f9481f809a99e28e37938af36730cfd0b36997a6 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 (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);