OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7925e0
)
(default_conversion): For enum that's unsigned,
author
rms
<rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Sep 1993 12:26:58 +0000
(12:26 +0000)
committer
rms
<rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Sep 1993 12:26:58 +0000
(12:26 +0000)
if it's at least as wide as int, convert to an unsigned type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5272
138bc75d
-0d04-0410-961f-
82ee72b054a4
gcc/c-typeck.c
patch
|
blob
|
history
diff --git
a/gcc/c-typeck.c
b/gcc/c-typeck.c
index
3cea85d
..
91fff29
100644
(file)
--- a/
gcc/c-typeck.c
+++ b/
gcc/c-typeck.c
@@
-944,7
+944,9
@@
default_conversion (exp)
{
type = type_for_size (MAX (TYPE_PRECISION (type),
TYPE_PRECISION (integer_type_node)),
- (flag_traditional && TREE_UNSIGNED (type)));
+ ((flag_traditional
+ || TYPE_PRECISION (type) >= TYPE_PRECISION (integer_type_node))
+ && TREE_UNSIGNED (type)));
return convert (type, exp);
}