aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-12-19 22:21:25 -0500
committerJason Merrill <jason@gcc.gnu.org>2003-12-19 22:21:25 -0500
commitf3da0ead0c5c3772c8322cc4aad8deeb382ef2dd (patch)
tree9bb4e10d802613726fd9fcebe175b05cee831ce4 /gcc/tree.c
parent46eb4b398948ddef881e51b9c49d96e242d56002 (diff)
downloadgcc-f3da0ead0c5c3772c8322cc4aad8deeb382ef2dd.zip
gcc-f3da0ead0c5c3772c8322cc4aad8deeb382ef2dd.tar.gz
gcc-f3da0ead0c5c3772c8322cc4aad8deeb382ef2dd.tar.bz2
tree.c (get_unwidened): Decide whether to narrow a bitfield reference based on TYPE_SIZE...
* tree.c (get_unwidened): Decide whether to narrow a bitfield reference based on TYPE_SIZE, not TYPE_PRECISION. * cp/cvt.c (convert_to_void): Don't warn about the RHS of a comma being useless if TREE_NO_UNUSED_WARNING is set. * stmt.c (parse_output_constraint): Warn about in-out constraint that doesn't allow a register. (parse_input_constraint): Warn about matching constraint that doesn't allow a register. From-SVN: r74871
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 52faeaf..b252a67 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4123,7 +4123,7 @@ get_unwidened (tree op, tree for_type)
The resulting extension to its nominal type (a fullword type)
must fit the same conditions as for other extensions. */
- if (innerprec < TYPE_PRECISION (TREE_TYPE (op))
+ if (INT_CST_LT_UNSIGNED (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (op)))
&& (for_type || ! DECL_BIT_FIELD (TREE_OPERAND (op, 1)))
&& (! uns || final_prec <= innerprec || unsignedp)
&& type != 0)