some strange strtod behaviour, please help

Pietro Cerutti pietro.cerutti at gmail.com
Fri Jul 7 10:07:26 UTC 2006


On 7/7/06, O. Hartmann <ohartman at uni-mainz.de> wrote:
> Pietro Cerutti wrote:
> > On 7/7/06, O. Hartmann <ohartman at uni-mainz.de> wrote:
> >> Hello out here,
> >> sorry bothering you with some standard issues ...
> >>
> >> I ran into trouble with a routine from <string.h>.
> >
> > No, from stdlib.h
> >
> > man strtod says:
> > SYNOPSIS
> >     #include <stdlib.h>
> >
> >
> >> #include <stdio.h>
> >> #include <math.h>
> >> #include <string.h>
> >
> > #include <stdlib.h> will solve your problems...
> >
>
>
> Yes, it does.
> Thanks ...
> I wonder why the compiler did not moan about a unknow call ...

Because it could be an error or not, depending on what standard are you using.
In C89 a function without a prototype is implicitly declared.
This is not true if your're working in C99.


Using cc with -Wimplicit as option will show you warnings about
implicit function declarations..

Using cc with -Wall as option is usually good practice....

>
> Thnaks a lot,
> oh
>


-- 
Pietro Cerutti
ICQ: 117293691
PGP: 0x9571F78E

- ASCII Ribbon Campaign -
 against HTML e-mail and
 proprietary attachments
   www.asciiribbon.org


More information about the freebsd-questions mailing list