Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Mar 2003 19:58:14 +0200
From:      Ruslan Ermilov <ru@FreeBSD.ORG>
To:        Maxime Henrion <mux@FreeBSD.ORG>
Cc:        arch@FreeBSD.ORG
Subject:   Re: WARNS=6 changes
Message-ID:  <20030314175814.GC94719@sunbay.com>
In-Reply-To: <20030313192045.GG3819@elvis.mu.org>
References:  <20030313192045.GG3819@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--gj572EiMnwbLXET9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Mar 13, 2003 at 08:20:45PM +0100, Maxime Henrion wrote:
> 	Hi all,
>=20
>=20
> I've been told it would be good to post this change here for discussion,
> so here it is.  This patch changes the default standard used for
> warnings from c89 to c99.  It only affects WARNS=3D6 code (that is, very
> few code).  It also makes it possible to select another standard with
> the WSTD variable if we ever need to.  Of course, I've tested that no
> parts of the build is broken with this patch.
>=20
I think that *not* hard-coding WSTD is not good, because it then
may mean different things for different settings.

> Index: bsd.sys.mk
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /space2/ncvs/src/share/mk/bsd.sys.mk,v
> retrieving revision 1.11
> diff -u -p -r1.11 bsd.sys.mk
> --- bsd.sys.mk	13 Nov 2002 13:49:29 -0000	1.11
> +++ bsd.sys.mk	13 Mar 2003 18:25:40 -0000
> @@ -29,7 +29,8 @@ CFLAGS		+=3D	-Wuninitialized
>  .  endif
>  # BDECFLAGS
>  .  if ${WARNS} > 5
> -CFLAGS		+=3D	-ansi -pedantic -Wbad-function-cast -Wchar-subscripts -Winl=
ine -Wnested-externs -Wredundant-decls
> +WSTD		?=3D	c99
> +CFLAGS		+=3D	-std=3D${WSTD} -pedantic -Wbad-function-cast -Wchar-subscri=
pts -Winline -Wnested-externs -Wredundant-decls
>  .  endif
>  .  if ${WARNS} > 1 && ${WARNS} < 5
>  # XXX Delete -Wuninitialized by default for now -- the compiler doesn't


Cheers,
--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--gj572EiMnwbLXET9
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+chg2Ukv4P6juNwoRAjVtAJ0fHM1PRKSkCeFmTV4uOvRfqfNIkQCggzvB
1TVQ6RdXbHxtHXx74fJGhms=
=1MCt
-----END PGP SIGNATURE-----

--gj572EiMnwbLXET9--

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




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