delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/07/22/16:35:21

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3D3C5D8A.73ECA0D3@phekda.freeserve.co.uk>
Date: Mon, 22 Jul 2002 20:31:22 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: Jordan Gordeev <jgordeev AT dir DOT bg>
CC: djgpp-workers AT delorie DOT com
Subject: Re: Bug in DJGPP 2.03 (with GCC 3.1)
References: <3D3B033D DOT 7030403 AT dir DOT bg>
Reply-To: djgpp-workers AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019