News for hackers. Stuff that matters.
Re:Found a bug in the GCC system (not deep, complex or new, ... by jmillikin on Friday May 21, 2010 @11:58AM (#1367732)
Misleading headline -- GCC is behaving according to spec. It would have a bug if the output had been 5.7 in both cases.

Arguably, allowing procedures to be called without prototypes is a bug in the C spec, but I doubt it'll be removed any time soon simply due to sheer volume of extant legacy code.

Re:Found a bug in the GCC system (not deep, complex or new, ... by jrockway on Friday May 21, 2010 @12:00PM (#1367737)
It's strange, though. He includes stdlib.h, and according to my man pages:

   NAME
       strtod, strtof, strtold - convert ASCII string to floating-point number
 
   SYNOPSIS
       #include <stdlib.h>

       double strtod(const char *nptr, char **endptr);
       float strtof(const char *nptr, char **endptr);
Furthermore, here's stdlib.h:

    extern float strtof (__const char *__restrict __nptr,
                         char **__restrict __endptr) __THROW __nonnull ((1)) __wur;
Perhaps it works on my machine because I'm not using an out-of-date version of GCC (gcc (Debian 4.4.4-2) 4.4.4)?
Re:Found a bug in the GCC system (not deep, complex or new, ... by jey on Friday May 21, 2010 @12:27PM (#1367817)
Scroll down in your manpage to the "CONFORMS TO" section. You'll see that strtof was only introduced in C99. This means that stdlib.h tests some macro to determine whether it's in C99 mode before declaring the prototype for strtof.
Re:Found a bug in the GCC system (not deep, complex or new, ... by bobbyi on Friday May 21, 2010 @12:58PM (#1367937)
GCC doesn't use C99 mode by default? Is it going to become the default at some point?
Re:Found a bug in the GCC system (not deep, complex or new, ... by RiderOfGiraffes on Friday May 21, 2010 @01:10PM (#1367972)
To be fair, recent versions probably do. For reasons I won't (or can't) go into, I have a tendency to be using slightly older systems. That's why I'm more interested in finding out how things can be traced, rather than worrying about this specific mis-match between my expectations and the system's behavior.
Re:Found a bug in the GCC system (not deep, complex or new, ... by jmillikin on Friday May 21, 2010 @04:50PM (#1368811)
If it does, that version will break a huge amount of existing C code.