aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul Eggert <eggert@gnu.org>1993-07-12 21:10:27 +0000
committerPaul Eggert <eggert@gnu.org>1993-07-12 21:10:27 +0000
commitda3c61151d5e85eb4723f3e8f5a2ed1c33e56ea6 (patch)
tree251b0dce7cbc41f7a7edeb8df13cdff281aaf181 /gcc
parent90c939d4ee5262bc3fe87d3b98a3ae47be5c4341 (diff)
downloadgcc-da3c61151d5e85eb4723f3e8f5a2ed1c33e56ea6.zip
gcc-da3c61151d5e85eb4723f3e8f5a2ed1c33e56ea6.tar.gz
gcc-da3c61151d5e85eb4723f3e8f5a2ed1c33e56ea6.tar.bz2
(convert_for_assignment): Use `convert_and_check',
not `convert', for converting arithmetic types, since `convert_and_check' no longer reports an error where it should just warn. From-SVN: r4910
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-typeck.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 68c8946..8ff4da5 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -4178,11 +4178,7 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum)
&&
(coder == INTEGER_TYPE || coder == REAL_TYPE || coder == ENUMERAL_TYPE
|| codel == COMPLEX_TYPE))
- /* Don't use convert_and_check here. If the input has type int
- and did not overflow, and we are converting it here to a short,
- we don't want an error. A warning would be okay, but it's too risky now
- to add an option to convert_and_check to get just warnings. */
- return convert (type, rhs);
+ return convert_and_check (type, rhs);
/* Conversion to a union from its member types. */
else if (codel == UNION_TYPE)
{