diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ArithmeticConversion.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ArithmeticConversion.java index ce8d9a32141..dbc2c9dc718 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ArithmeticConversion.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ArithmeticConversion.java @@ -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; }