<div dir="ltr">On Thu, Jun 20, 2013 at 3:10 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<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"><div><div class="h5">On Thu, Jun 20, 2013 at 2:46 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br>
</div></div><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">

<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"><div><div>On Thu, Jun 20, 2013 at 2:29 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br>


</div></div><div class="gmail_extra"><div class="gmail_quote"><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 dir="ltr"><div><div>On Thu, Jun 20, 2013 at 2:25 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br>



</div></div><div class="gmail_extra"><div class="gmail_quote"><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 dir="ltr"><div>Thanks for the quick review!</div><div>



<div><br></div>On Thu, Jun 20, 2013 at 2:02 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br>

</div><div class="gmail_extra"><div class="gmail_quote"><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 dir="ltr">
<div><div>On Thu, Jun 20, 2013 at 1:45 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">






<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">Hi,<div><br></div><div>the attached patch lazily inserts a __float128 type the first time one is looked up. This is needed to compile libstdc++4.7+ headers in -std=gnu++11 mode. This fixes PR13530, see that bug for more information.</div>







<div><br></div><div>Ok?</div><span><font color="#888888"><div></div></font></span></div></blockquote></div><br></div></div></div><div class="gmail_extra">Is there any particular reason you're checking for GNUMode?</div>





</div></blockquote><div><br></div></div><div>Yes, type_traits only adds __is_floating_pointer_helper<__float128> if __STRICT_ANSI__ isn't defined. InitPreprocessor.cpp defines this exactly if !GNUMode. I changed the test to check for __STRICT_ANSI__ to maybe make this a bit clearer.</div>




<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 dir="ltr">
<div class="gmail_extra">"variable has incomplete type '__float128'" is a terrible error message if someone actually tries to use __float128 with clang.  Can we do better?<br></div></div></blockquote><div>





<br></div></div><div>We can, attached.</div><div> </div><div><br></div></div></div></div></blockquote><div><br></div></div></div><div>Not sure if this catches all cases, but it's probably good enough.</div><div><br></div>



<div>Otherwise, looks fine.</div></div></div></div></blockquote><div><br></div></div></div><div>r184476, thanks!</div><div><br></div><div>I looked through a few diags in DiagnosticSemaKind mentioning "incomplete type", and the ones I checked all go through RequireCompleteType (I checked err_incomplete_type err_typecheck_decl_incomplete_type err_invalid_incomplete_type_use err_bad_dynamic_cast_incomplete err_incomplete_typeid err_new_incomplete_type warn_delete_incomplete err_catch_incomplete_ptr err_catch_incomplete_ref err_throw_incomplete err_throw_incomplete_ptr err_incomplete_object_call)</div>



<div> </div><div><br></div></div></div></div></blockquote><div><br></div></div></div><div>We pretty consistently go through RequireCompleteType, yes.  I was more worried about something like "x + *y", where y is a __float128*; I don't think we actually use RequireCompleteType to produce a diagnostic in that case.</div>
<span class=""><font color="#888888">
<div></div></font></span></div></div></div></blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Just checked; the following crashes with your patch:</div><div class="gmail_extra"><br></div>
<div class="gmail_extra"><p style="margin:0px;font-size:11px;font-family:Menlo">void f(int x, __float128*y) { x+*y; }</p><div><br></div><div>=Eli</div></div></div>