<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Gousemoodhin,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I don't think 4.1.4 mentions anything about comparisons. The only mention of unspecified with floating point is "The rounding of conversions from a fixed-point type to a floating point type is unspecified."</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
UsualArithmeticConversions and handleFixedPointConversion do not actually convert anything, they simply determine what the result type of the operation would be. So that would not be the place to 'determine' unspecified-ness; that would be a property of how
 the computation is performed in CodeGen or constant evaluation.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'm assuming you are trying to implement the floating point portions of N1169. A lot of the necessary boilerplate is not in place for that, as I haven't had time to look at it much quite yet.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
/ Bevin<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> cfe-dev <cfe-dev-bounces@lists.llvm.org> on behalf of Gousemoodhin Nadaf via cfe-dev <cfe-dev@lists.llvm.org><br>
<b>Sent:</b> Saturday, June 13, 2020 6:22 AM<br>
<b>To:</b> cfe-dev@lists.llvm.org <cfe-dev@lists.llvm.org><br>
<b>Subject:</b> [cfe-dev] Fixed point and floating point comparision</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hello,<br>
When a comparison is made between the<b> fixed point and floating point</b>, the result is unspecified. Reference N1169 4.1.4 (Type conversion, usual arithmetic conversions).<br>
<br>
In code, for fixed-point number, <span style="color:rgb(0,0,0); white-space:pre-wrap">handleFixedPointConversion()(SemaExpr.cpp) is called,
</span> I need to return unspecified.<br>
<br>
<i>   <span style="color:rgb(0,0,0); white-space:pre-wrap">handleFixedPointConversion()</span>  {<br>
    if ((LHS is fixed point && RHS is floating point)  OR (RHS is fixed point && LHS is floating point)  )<br>
      return unspecified.<br>
    }</i><br>
<br>
please let me know If anyone has idea, how to return unspecified or handle an unspecified case in UsualArithmeticConversions.<br>
<br>
Regards,<br>
Nadaf.</div>
</div>
</body>
</html>