cygwin g++ failures `::acosf' undeclared (first use here)
Gabriel Dos Reis
Thu Jul 26 02:09:00 GMT 2001
"Billinghurst, David (CRTS)" <David.Billinghurst@riotinto.com> writes:
| Around 10 of my g++ testsuite failures on cygwin due to the use of the
| compiler option "-ansi" in the g++ testsuite.
| The failures are of the form:
| In file included
| from <...>/include/bits/std_complex.h:43,
| from <...>/libstdc++-v3/include/complex:31,
| from <...>/g++.brendan/crash20.C:3:
| <...>/std_cmath.h: In function `float std::acos(float)':
| <...>/std_cmath.h:95: `::acosf' undeclared (first use here)
| <...>/std_cmath.h: In function `float std::asin(float)':
| ... /std_cmath.h:113: `::asinf' undeclared (first use here)
| ... /std_cmath.h: In function `float std::atan(float)':
| ... /std_cmath.h:131: `::atanf' undeclared (first use here)
| Any ideas?
A reliable fix is to adopt the __builtin_xxx road, but we don't have
built-in support for the incriminated functions :-(
This reopens the question of whether we should test for features (at
configure time) with -ansi on.
Currently here is what happens: we test support for features without
turning on -ansi and then we build the library on top of them.
Latter, users specify -ansi and boom we get confused...
On the other hand, detecting features with -ansi on may lead us miss
some nonetheless supported features in non-strict mode.
I don't have any definitive answer.
I'll work on a patch for your problem. Thanks.
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-bugs