From owner-freebsd-arch Thu Mar 13 11:20:47 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B50C337B401 for ; Thu, 13 Mar 2003 11:20:45 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B01443F75 for ; Thu, 13 Mar 2003 11:20:45 -0800 (PST) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 453622ED3CF; Thu, 13 Mar 2003 11:20:45 -0800 (PST) Date: Thu, 13 Mar 2003 20:20:45 +0100 From: Maxime Henrion To: arch@FreeBSD.org Subject: WARNS=6 changes Message-ID: <20030313192045.GG3819@elvis.mu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="uZ3hkaAS1mZxFaxD" Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --uZ3hkaAS1mZxFaxD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, 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=6 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. Cheers, Maxime --uZ3hkaAS1mZxFaxD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bsd.sys.mk.patch" Index: bsd.sys.mk =================================================================== 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 += -Wuninitialized . endif # BDECFLAGS . if ${WARNS} > 5 -CFLAGS += -ansi -pedantic -Wbad-function-cast -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls +WSTD ?= c99 +CFLAGS += -std=${WSTD} -pedantic -Wbad-function-cast -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls . endif . if ${WARNS} > 1 && ${WARNS} < 5 # XXX Delete -Wuninitialized by default for now -- the compiler doesn't --uZ3hkaAS1mZxFaxD-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message