From: <no...@so...> - 2002-09-28 00:01:26
|
Bugs item #615664, was opened at 2002-09-28 08:00 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=615664&group_id=2435 Category: gcc Group: None Status: Open Resolution: None Priority: 5 Submitted By: Xavier Trochu (xtrochu) Assigned to: Danny Smith (dannysmith) Summary: cmath and ansi Initial Comment: There is a bug that occur when compiling with the -ansi and when including <cmath> header. a simple test : test.cpp #include <cmath> $ gcc -c test.cpp In file included from base_math_test.cpp:1: c:/tools/mingw/include/c++/3.2/cmath: In function `float std::acos(float)': c:/tools/mingw/include/c++/3.2/cmath:99: `::acosf' undeclared (first use here) ... The problem is that _mingw.h define _GLIBCPP_HAVE_ACOSF even when compiling with -ansi but math.h does not declare the acosf() function if __STRICT_ANSI__ is not defined. ---------------------------------------------------------------------- >Comment By: Danny Smith (dannysmith) Date: 2002-09-28 12:01 Message: Logged In: YES user_id=11494 What is version of mingw-runtime (in _mingw.h). I though this bug was fixed by a change in math.h that protected C99 math with: #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ || !defined __STRICT_ANSI__ || defined __GLIBCPP__ so that C99 math was available to __GLIBCPP__ Actually, in hindsight, I think this is the wrong fix. the guard should be something more strict like: defined __GLIBCPP_USE_C99 In even stricter sense, C++98 shouldn't be exposing C99 functions which are not part of C++98 std. If you are using mingw runtime earlier than 2.2 , please update and tell me if problem persists. Danny ---------------------------------------------------------------------- Comment By: Xavier Trochu (xtrochu) Date: 2002-09-28 08:02 Message: Logged In: YES user_id=1927 please note that this is new and the software that produced the bug compiled fine with gcc 3.1 I forgot to mention that it was for gcc 3.2 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=615664&group_id=2435 |