[Bug libstdc++/69893] New: [6 Regression] Conflicting declarations in <math.h> and <parallel/algorithm>
miyuki at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Feb 21 13:37:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69893
Bug ID: 69893
Summary: [6 Regression] Conflicting declarations in <math.h>
and <parallel/algorithm>
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: miyuki at gcc dot gnu.org
CC: redi at gcc dot gnu.org
Target Milestone: ---
The following program used to work some time ago (with GCC 20160118), but with
current version it is rejected:
$ cat test.cc
#include <math.h>
#include <parallel/algorithm>
$ cc1plus test.cc
In file included from /opt/gcc-6.0.0/include/c++/6.0.0/tr1/random:46:0,
from
/opt/gcc-6.0.0/include/c++/6.0.0/parallel/random_number.h:36,
from /opt/gcc-6.0.0/include/c++/6.0.0/parallel/partition.h:38,
from /opt/gcc-6.0.0/include/c++/6.0.0/parallel/quicksort.h:36,
from /opt/gcc-6.0.0/include/c++/6.0.0/parallel/sort.h:48,
from /opt/gcc-6.0.0/include/c++/6.0.0/parallel/algo.h:45,
from /opt/gcc-6.0.0/include/c++/6.0.0/parallel/algorithm:37,
from test.cc:2:
/opt/gcc-6.0.0/include/c++/6.0.0/tr1/cmath: In function 'float
std::tr1::acosh(float)':
/opt/gcc-6.0.0/include/c++/6.0.0/tr1/cmath:424:18: error: 'float
std::tr1::acosh(float)' conflicts with a previous declaration
acosh(float __x)
^
In file included from /opt/gcc-6.0.0/include/c++/6.0.0/math.h:36:0,
from test.cc:1:
/opt/gcc-6.0.0/include/c++/6.0.0/cmath:1224:3: note: previous declaration
'constexpr float std::acosh(float)'
acosh(float __x)
^~~~~
...
(more errors follow)
More information about the Gcc-bugs
mailing list