<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 9, 2014 at 10:55 AM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">They are exposed:<div><a href="http://clang.llvm.org/docs/LanguageExtensions.html#checked-arithmetic-builtins" target="_blank">http://clang.llvm.org/docs/LanguageExtensions.html#checked-arithmetic-builtins</a><br>
</div><div>
<br></div><div>... but that's not indexed by Google.  Maybe this is the problem?</div><div><a href="http://clang.llvm.org/robots.txt" target="_blank">http://clang.llvm.org/robots.txt</a>:</div><div><div>User-agent: *</div>
<div>Disallow: </div></div></div></blockquote><div><br></div><div>That's an 'allow everything' robots.txt. The results are there; try searching for: "__builtin_uadd_overflow" clang</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 9, 2014 at 10:27 AM, Andy Lutomirski <span dir="ltr"><<a href="mailto:luto@amacapital.net" target="_blank">luto@amacapital.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">LLVM has the llvm.*.with.overflow.* intrinsics.  Can these be exposed<br>

to C code?  I imagine this would be straightforward, aside from the<br>
obligatory bikeshedding about exactly what the interface should be.<br>
<br>
This would eliminate a lot of nasty hacks used to check for overflow,<br>
especially for multiplication overflow.  I currently write this stuff<br>
in inline x86 assembler -- ugh!  And maybe gcc would go along if clang<br>
paved the way :)<br>
<br>
--Andy<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>