cvs commit: src/usr.bin/chat Makefile
Peter Jeremy
PeterJeremy at optushome.com.au
Thu Oct 30 00:23:29 PST 2003
On Tue, Oct 28, 2003 at 10:28:24PM +1100, Bruce Evans wrote:
>Similarly for `return (log(3));`. gcc doesn't do the log() inline, at
>least on i386's with no options, but it knows to pass 3.0 and convert
>the return value to int.
It shouldn't. If I write:
int foo(int x)
{
return (log(x));
}
without explicitly declaring any prototype for log(), gcc should
assume a declaration "int log(int);". Arbitrarily deciding that
the declaration should be "double log(double);" breaks K&R C and
C90 programs.
It seems that gcc is diverging more and more from the ISO standards.
Peter
More information about the cvs-src
mailing list