Mail Archives: djgpp-workers/2002/07/22/16:35:21
Hello.
Jordan Gordeev wrote:
>
> I have a problem when compiling a C++ program which includes
> <iostream> in -ansi mode.
> The attached files demo.cpp and demo.err demonstrate the bug.
> I think the problem is caused by the new header files.
> I don't have such a problem with DJGPP 2.03 (with GCC 2.953).
[snip]
> In file included from c:/djgpp/lang/cxx-v31/bits/locale_facets.tcc:41,
> from c:/djgpp/lang/cxx-v31/locale:46,
> from c:/djgpp/lang/cxx-v31/bits/ostream.tcc:37,
> from c:/djgpp/lang/cxx-v31/ostream:275,
> from c:/djgpp/lang/cxx-v31/iostream:45,
> from demo.cpp:1:
[snip]
> c:/djgpp/lang/cxx-v31/cmath: In function `float std::tanh(float)':
> c:/djgpp/lang/cxx-v31/cmath:496: `::tanhf' undeclared (first use here)
tanhf and the other functions listed became part of the C standard in C99. But
DJGPP doesn't support C99 yet. These functions are in the non-standard section
of <math.h> and are therefore unavailable, when you use the -ansi option.
(Look for the #ifndef __STRICT_ANSI__, #ifndef _POSIX_SOURCE lines.)
I suspect that gcc 2.95.3 didn't have std::tanhf and the others, so this
problem did not arise.
I believe someone (AB Williams?) is looking at bringing DJGPP's math component
up to the C99 level.
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -