]> git.ipfire.org Git - thirdparty/glibc.git/commit
Do not use __builtin_types_compatible_p in C++ mode (bug 21930)
authorGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
Mon, 21 Aug 2017 12:23:27 +0000 (14:23 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 21 Aug 2017 12:23:27 +0000 (14:23 +0200)
commitc2921b17a37e887b8a5ca9d84b875b9ba702b79c
tree133c3f68ec630f529a8e8c2a51795302ade09dd5
parent645b7635ba8fd58062245419e8bb668ab90cd3ec
Do not use __builtin_types_compatible_p in C++ mode (bug 21930)

The logic to define isinf for float128 depends on the availability of
__builtin_types_compatible_p, which is only available in C mode,
however, the conditionals do not check for C or C++ mode.  This lead to
an error in libstdc++ configure, as reported by bug 21930.

This patch adds a conditional for C mode in the definition of isinf for
float128.  No definition is provided in C++ mode, since libstdc++
headers undefine isinf.

Tested for powerpc64le (glibc test suite and libstdc++-v3 configure).

[BZ #21930]
* math/math.h (isinf): Check if in C or C++ mode before using
__builtin_types_compatible_p, since this is a C mode feature.

(cherry picked from commit 47a67213a9f51c5f8816d240500b10db605d8b77)
ChangeLog
NEWS
math/math.h