This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix libstdc++-v3/include/math.h:66:1 2: error: 'constexpr bool std::isnan(double)' conflicts with a previous declaration
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>, John David Anglin <dave dot anglin at bell dot net>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Date: Thu, 4 Feb 2016 23:11:20 +0100 (CET)
- Subject: Re: [PATCH] Fix libstdc++-v3/include/math.h:66:1 2: error: 'constexpr bool std::isnan(double)' conflicts with a previous declaration
- Authentication-results: sourceware.org; auth=none
- References: <83B5E03D-B776-49BE-B1C2-23E19D8E9410 at bell dot net> <20160128104655 dot GY15084 at redhat dot com>
On Thu, 28 Jan 2016, Jonathan Wakely wrote:
> On 27/01/16 19:49 -0500, John David Anglin wrote:
>> The attached patch fixes a stage1 build error compiling genautomata.c
>> on hpux. We need to test for obsolete XOPEN declarations of isinf and
>> isnan on hpux. Further, we need to check individually for isinf and
>> isnan on hpux11 since only isnan has an obsolete XOPEN declaration.
>> Tested on hppa2.0w-hp-hpux11.11.
> Also tests OK on x86_64-linux (with glibc 2.22).
It seems to break older versions of FreeBSD that have GCC 4.2
as their system compiler. (Those versions aren't actually all
that old, they are stuck with GCC 4.2 as the last version under
GPLv2.)
In file included from .././../gcc-6-20160131/gcc/genautomata.c:116:0:
/wrkdirs/usr/ports/lang/gcc6-devel/work/gcc-6-20160131/libstdc++-v3/include/c_compatibility/math.h:65:12:
error: 'constexpr bool std::isinf(double)' conflicts with a previous declaration
using std::isinf;
^~~~~
See
http://beefy2.nyi.freebsd.org/data/93amd64-default/408008/logs/gcc6-devel-6.0.0.s20160131.log
for a full log.
Gerald
PS: I don't have direct access to this system, or I'd provide
preprocessed headers. If you need those, I can try to create
a VM and get things reproduced there.