Index: clang/lib/Sema/SemaExpr.cpp =================================================================== --- clang/lib/Sema/SemaExpr.cpp +++ clang/lib/Sema/SemaExpr.cpp @@ -1505,6 +1505,12 @@ if (unsupportedTypeConversion(*this, LHSType, RHSType)) return QualType(); + // Comparison between the fixed point and floating point is unspecified. + // Reference N1169 4.1.4 (Type conversion, usual arithmetic conversions). + if ((LHSType->isFixedPointType() && RHSType->isRealFloatingType()) || + (LHSType->isRealFloatingType() && RHSType->isFixedPointType())) + return QualType(); + // Handle complex types first (C99 6.3.1.8p1). if (LHSType->isComplexType() || RHSType->isComplexType()) return handleComplexFloatConversion(*this, LHS, RHS, LHSType, RHSType,