<p dir="ltr"><br>
</p>
<p dir="ltr"></p>
<p dir="ltr">On Thu, Sep 10, 2015, 5:48 AM Pflanzer, Moritz via Libclc-dev <<a href="mailto:libclc-dev@lists.llvm.org">libclc-dev@lists.llvm.org</a>> wrote:</p>
<blockquote><p dir="ltr">Hello,</p>
<p dir="ltr">I found out that the current definition of INT_MIN as</p>
<p dir="ltr">#define INT_MIN (-2147483648)</p>
<p dir="ltr">can cause problems because this number seems to be represented as long in the Clang compiler which leads to conversion failures. I posted a message with some more details to the llvm-dev mailing list to ask about the behaviour (<a href="http://lists.llvm.org/pipermail/llvm-dev/2015-September/090278.html">http://</a><a href="http://lists.llvm.org/pipermail/llvm-dev/2015-September/090278.html">lists.llvm.org</a><a href="http://lists.llvm.org/pipermail/llvm-dev/2015-September/090278.html">/</a><a href="http://lists.llvm.org/pipermail/llvm-dev/2015-September/090278.html">pipermail</a><a href="http://lists.llvm.org/pipermail/llvm-dev/2015-September/090278.html">/</a><a href="http://lists.llvm.org/pipermail/llvm-dev/2015-September/090278.html">llvm-dev</a><a href="http://lists.llvm.org/pipermail/llvm-dev/2015-September/090278.html">/2015-September/090278.html</a>).</p>
<p dir="ltr">Nevertheless, the problem could be prevented if the definition is changed to</p>
<p dir="ltr">#define INT_MIN (-2147483647 - 1)</p>
<p dir="ltr">which is represented as int. This is also the definition that the OpenCL C 1.1 standard suggests (§6.11.3).</p>
<p dir="ltr">Is there a particular reason why this definition is not used or do you have any concerns about changing it?<br>
</p>
</blockquote>
<p dir="ltr"><br>
Sounds reasonable to me.</p>
<p dir="ltr">I'll try to check the other definitions later and see if I have time to prep a patch/tests.</p>
<p dir="ltr">--Aaron<br>
</p>
<blockquote><p dir="ltr"><br>
Regards,</p>
<p dir="ltr">Moritz<br>
_______________________________________________<br>
Libclc-dev mailing list<br>
<a href="mailto:Libclc-dev@lists.llvm.org">Libclc-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev">http://</a><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev">lists.llvm.org</a><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev">/</a><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev">cgi-bin</a><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev">/mailman/</a><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev">listinfo</a><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev">/</a><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev">libclc-dev</a><br>
</p>
</blockquote>
<p dir="ltr"><br>
</p>