On 02/07/2016 02:59 PM, Orion Poplawski wrote:
> With a simple:
> 
> #include <config.h>
> #include <math.h>
> #include <cmath>
> 
> int main(int argc,char **argv) {
> }
> 
> I'm able to reproduce the compile error:
> 
> g++ -DHAVE_CONFIG_H -I. -I..  -I../lib   -g -O2 -MT foobar.o -MD -MP -MF
> .deps/foobar.Tpo -c -o foobar.o foobar.cpp
> In file included from foobar.cpp:2:0:
> ../lib/math.h: In function ‘int signbit(float)’:
> ../lib/math.h:2576:1: error: ‘int signbit(float)’ conflicts with a previous
> declaration
>  _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
>  ^
> In file included from /usr/include/c++/6.0.0/math.h:36:0,
>                  from ../lib/math.h:27,
>                  from foobar.cpp:2:
> /usr/include/c++/6.0.0/cmath:681:3: note: previous declaration ‘constexpr bool
> std::signbit(float)’
>    signbit(float __x)
>    ^~~~~~~
> In file included from foobar.cpp:2:0:
> ../lib/math.h: In function ‘int signbit(double)’:
> ../lib/math.h:2576:1: error: ‘int signbit(double)’ conflicts with a previous
> declaration
>  _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
>  ^
> In file included from /usr/include/c++/6.0.0/math.h:36:0,
>                  from ../lib/math.h:27,
>                  from foobar.cpp:2:
> /usr/include/c++/6.0.0/cmath:685:3: note: previous declaration ‘constexpr bool
> std::signbit(double)’
>    signbit(double __x)
>    ^~~~~~~
> In file included from foobar.cpp:2:0:
> ../lib/math.h: In function ‘int signbit(long double)’:
> ../lib/math.h:2576:1: error: ‘int signbit(long double)’ conflicts with a
> previous declaration
>  _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
>  ^
> In file included from /usr/include/c++/6.0.0/math.h:36:0,
>                  from ../lib/math.h:27,
>                  from foobar.cpp:2:
> /usr/include/c++/6.0.0/cmath:689:3: note: previous declaration ‘constexpr bool
> std::signbit(long double)’
>    signbit(long double __x)
>    ^~~~~~~
> 
> Although I really don't have any good ideas about how to fix this.

Any ideas anyone?

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       or...@nwra.com
Boulder, CO 80301                   http://www.nwra.com

Reply via email to