Mail Archives: djgpp-workers/2002/07/23/02:09:21
On Mon, 22 Jul 2002 sandmann AT clio DOT rice DOT edu wrote:
> > 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.
>
> So this means that 2.03 is incompatible with gcc 3.x with -ansi ?
Yes.
> Should we consider a header change for 2.03 refresh to fix? Or is it
> more complicated?
There are other headers, besides math.h, which have the same problem:
functions standardized by C99 have their prototypes masked under -ansi.
If we decide to fix math.h, we should fix the other headers as well.
I don't know what should the compiler do if invoked with -c89 (sp?)
switch, though? Should it omit the prototypes of functions that were
non-standard in C89? Does that interact in some way with -ansi? If we
need to do something else about these cases, the fix might be more
complicated than just moving some prototypes.
- Raw text -