This is the mail archive of the
mailing list for the GCC project.
Re: Bug in strtof
Qianli Zhang wrote:
> Sorry to bother you. Recently I met with a problem in strtof, a sample program is like:
Compile with -Wall, and you get a warning saying that the return type of
strtof is unknown, and the program fails.
Compile with -Wall -std=c99 and you get no warning and the program works.
It looks like glibc only enables full support for functions from the ISO
C99 standard with extra preprocessor macros defined when -std=c99 is
used. And it looks like this macro is _STDC_VERSION. There are also
glibc tests for the _ISOC99_SOURCE and _ISOC9X_SOURCE macros which look
like they are meant for users to define.
Jim Wilson, GNU Tools Support, http://www.specifix.com