Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Dec 2001 09:59:30 -0800
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        Kris Kennaway <kris@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/bin/rm rm.c src/usr.sbin/chown chown.c src/usr.sbin/dev_mkdb dev_mkdb.c
Message-ID:  <20011215095930.A62613@iguana.aciri.org>
In-Reply-To: <20011215090750.A91194@citusc17.usc.edu>
References:  <200112141622.fBEGMg705939@freefall.freebsd.org> <20011215090750.A91194@citusc17.usc.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
There is something I do not follow.

Over time we have gone through great pains to keep the code compatible
with a wide range of compilers (including K&R when possible, by
using __P() macros), and now people complain suggesting that instead
of supplying perfectly legal (K&R and ANSI) C prototypes to 3
functions, which do not break anything and only increase code
portability towards possibly broken compilers, I should instead
compile the source tree with a version-specific compiler.

Am i the only one who sees a contraddiction here ?

	cheers
	luigi

On Sat, Dec 15, 2001 at 09:07:50AM -0800, Kris Kennaway wrote:
> On Fri, Dec 14, 2001 at 08:22:42AM -0800, Luigi Rizzo wrote:
> > luigi       2001/12/14 08:22:42 PST
> > 
> >   Modified files:
> >     bin/rm               rm.c 
> >     usr.sbin/chown       chown.c 
> >     usr.sbin/dev_mkdb    dev_mkdb.c 
> >   Log:
> >   Add prototypes for main() so that these programs compile with -Werror
> >   (which somehow now seems to be the default for compiling -current).
> >   This error popped up while doing a PicoBSD cross-compile on a 4.3-ish system,
> >   it may well be that there are other apps which have similar problems,
> >   but I did not spot them as they are not included in my picobsd config.
> 
> Nope, the problem is that your gcc is different than the one in
> -current and emits different warnings.  You need to build FreeBSD with
> NO_WERROR=1 if you're using a nonstandard gcc compiler, or bootstrap
> the standard gcc compiler with NO_WERROR and then use it.  i.e. the
> bug seems to be in your bootstrap/cross-build environment and should
> be addressed there.
> 
> Adding prototypes for main() is the wrong thing to do, and our gcc was
> fixed to not treat these as warnings for this reason.
> 
> Kris



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011215095930.A62613>