aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2004-11-07 00:31:55 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2004-11-07 00:31:55 +0000
commitabb54d14c0aed154b2d57c56ee9e6b93888f0b7e (patch)
tree4ed7cc04dab762db0ecf111ff7600d457339b8db /gcc
parentd5d9e59836ca2c73414a421e9d2fe6c9dc1a1d7c (diff)
downloadgcc-abb54d14c0aed154b2d57c56ee9e6b93888f0b7e.zip
gcc-abb54d14c0aed154b2d57c56ee9e6b93888f0b7e.tar.gz
gcc-abb54d14c0aed154b2d57c56ee9e6b93888f0b7e.tar.bz2
c-typeck.c (build_unary_op): Replace unreachable diagnostic for taking address of bit-field by assertion.
* c-typeck.c (build_unary_op): Replace unreachable diagnostic for taking address of bit-field by assertion. From-SVN: r90216
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-typeck.c9
2 files changed, 7 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ed17a6b..5a004d5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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".
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index cf883b7..f9481f8 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -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);