[patch] Lazily provide a __float128 type in -std=gnu++11 mode

Nico Weber thakis at chromium.org
Thu Jun 20 14:25:27 PDT 2013


Thanks for the quick review!

On Thu, Jun 20, 2013 at 2:02 PM, Eli Friedman <eli.friedman at gmail.com>wrote:

> On Thu, Jun 20, 2013 at 1:45 PM, Nico Weber <thakis at chromium.org> wrote:
>
>> Hi,
>>
>> 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.
>>
>> Ok?
>>
>
> Is there any particular reason you're checking for GNUMode?
>

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.


> "variable has incomplete type '__float128'" is a terrible error message if
> someone actually tries to use __float128 with clang.  Can we do better?
>

We can, attached.


>
> -Eli
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130620/50b0f7b0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clangf128.patch
Type: application/octet-stream
Size: 6869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130620/50b0f7b0/attachment.obj>


More information about the cfe-commits mailing list