Date: Thu, 30 Oct 2003 19:23:13 +1100 From: Peter Jeremy <PeterJeremy@optushome.com.au> To: Bruce Evans <bde@zeta.org.au> Cc: cvs-src@freebsd.org Subject: Re: cvs commit: src/usr.bin/chat Makefile Message-ID: <20031030082313.GA1649@cirb503493.alcatel.com.au> In-Reply-To: <20031028222117.X4879@gamplex.bde.org> References: <200310260449.h9Q4nwm9016893@repoman.freebsd.org> <20031026171515.P17272@gamplex.bde.org> <xzpu15w9rhk.fsf@dwp.des.no> <20031027152156.Y21211@gamplex.bde.org> <xzpbrs1afvz.fsf@dwp.des.no> <20031028222117.X4879@gamplex.bde.org>
index | next in thread | previous in thread | raw e-mail
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
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031030082313.GA1649>
