mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
Fix arithmetic conversion from larger unsigned operand type
Fixes: 16944a0de7
("Arithmetic conversions for unary and binary expressions, bug 231859.")
Closes: https://github.com/eclipse-cdt/cdt/issues/265
This commit is contained in:
parent
cf834dd838
commit
57008babd8
1 changed files with 2 additions and 2 deletions
|
@ -201,8 +201,8 @@ public abstract class ArithmeticConversion {
|
|||
return unsignedType;
|
||||
}
|
||||
|
||||
// The signed has the higher rank.
|
||||
if (signedRank.ordinal() > unsignedRank.ordinal()) {
|
||||
// The signed has the higher rank, check if signed type can represent all unsigned values
|
||||
if (fitsIntoType(signedType, unsignedType)) {
|
||||
return signedType;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue