[Bug c/42990] "warning: implicit declaration of function 'xxx' " instead of "error: ..."

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Feb 7 14:49:00 GMT 2010



------- Comment #5 from rguenth at gcc dot gnu dot org  2010-02-07 14:49 -------
The linker didn't complain because atof is in libc which is linked in.  atoi
does work because any unprototyped function is treated as

int function();

thus the unprototyped atof results in

int atof();

which leads the compiler to insert a conversion from the presumed integer
return type to the floating-point result.  Which is what causes your
observation.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42990



More information about the Gcc-bugs mailing list