[PATCHv2] PR libstdc++/84654 Do not use __float128 if it is disabled by the compiler

Jonathan Wakely jwakely@redhat.com
Mon May 7 20:03:00 GMT 2018


On 01/05/18 15:34 +0100, Jonathan Wakely wrote:
>On 12/03/18 16:02 -0300, Tulio Magno Quites Machado Filho wrote:
>>Changes since v1:
>>- Completely rewrite of the patch to set ENABLE_FLOAT128 at libstdc++
>>  build time and undef _GLIBCXX_USE_FLOAT128 when building user code.
>>
>>--- 8< ---
>>
>>In order to use __float128 in C++ it's necessary to check if the
>>compiler enabled its support too when building user code.
>>This patch changes the behavior at libstdc++ build by setting
>>ENABLE_FLOAT128, which is used to set the value of the exported macro
>>_GLIBCXX_USE_FLOAT128.
>
>Now that we're in stage 1 we can make this change. The patch looks
>right so I'll go ahead and commit it to trunk (it shouldn't interfere
>with testing any last-minute fixes needed for gcc-8).
>
>Thanks for fixing this, Tulio.

Previously _GLIBCXX_USE_FLOAT128 would either be defined to 1 or
undefined, but after this change it can be defined to 0, and the
checks in <type_traits> and <bits/std_abs.h> were not adjusted to
account for that.

This patch restores the previous behaviour, so that when __float128
support is not found by configure the macro will be undefined instead
of defined to 0.

I plan to commit this tomorrow after some more testing.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 2471 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20180507/581d0eab/attachment.bin>


More information about the Libstdc++ mailing list