https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69721
Bug ID: 69721
Summary: [6 Regression] math.h is broken
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
I see ffado build fail with
[ 127s] g++ -o src/libutil/serialize_libxml.os -c -m64 -fmessage-length=0
-grecord-gcc-switches -Wall -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -Wno-error=misleading-indentation
-Wno-error=narrowing -Wno-error=nonnull -Wno-error=unused-const-variable -g
-fno-strict-aliasing -ggdb -Wno-deprecated-declarations -O2 -fPIC -mmmx
-mfpmath=sse -msse -msse2 -mssse3 -msse4.1 -msse4.2 -fomit-frame-pointer
-ffast-math -funroll-loops -fPIC -D_FORTIFY_SOURCE=2 -DDEBUG_MESSAGES
-DENABLE_BEBOB -DENABLE_FIREWORKS -DENABLE_OXFORD -DENABLE_MOTU -DENABLE_DICE
-DENABLE_METRIC_HALO -DENABLE_RME -DENABLE_DIGIDESIGN -DENABLE_BOUNCE
-DENABLE_GENERICAVC -I. -Isrc -I/usr/include/libxml++-2.6
-I/usr/lib64/libxml++-2.6/include -I/usr/include/libxml2
-I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sigc++-2.0
-I/usr/lib64/sigc++-2.0/include src/libutil/serialize_libxml.cpp
[ 127s] In file included from /usr/include/c++/6/math.h:36:0,
[ 127s] from src/libutil/TimestampedBuffer.cpp:182:
[ 127s] /usr/include/c++/6/cmath:101:37: error: '__is_integer' was not
declared in this scope
[ 127s] typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
[ 127s] ^~~~~~~~~~~~
noting that __is_integer is not std:: qualified in cmath.
Note that ffado includes math.h, not cmath and does so from within a namespace.
Doing that in a (too simple) testcase produces
In file included from /usr/include/c++/6/math.h:36:0,
from t.C:2:
/usr/include/c++/6/cmath:106:11: error: ‘::acos’ has not been declared
using ::acos;
^~~~
...
instead of the above.
namespace Foo {
#include <math.h>
}
this testcase works fine in GCC 5.