From owner-freebsd-arch Tue Dec 4 13:25:42 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mail11.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by hub.freebsd.org (Postfix) with ESMTP id 123C337B7AC for ; Tue, 4 Dec 2001 13:24:24 -0800 (PST) Received: (qmail 6552 invoked from network); 4 Dec 2001 21:24:23 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 4 Dec 2001 21:24:23 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20011204131152.A73842@dragon.nuxi.com> Date: Tue, 04 Dec 2001 13:24:18 -0800 (PST) From: John Baldwin To: "David O'Brien" Subject: RE: WARNS granularity Cc: freebsd-arch@freebsd.org 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 On 04-Dec-01 David O'Brien wrote: > IMO our WARNS values {0,1,2} are not granular enough. > > I would like to make 1 ==> -Werror only. This would help prevent > regressions with sources that do not produces warnings with the default > GCC warnings. > > WARNS=2 would add: > -Wall > I think having a WARNS level that is just -Wall is useful as -Wall is the > most common thing GCC users compile with if they use any warnings at all. > > WARNS=3 would be the same as today's `1', which adds: > -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith > -Wno-uninitialized > > WARNS=4 would be the same as today's `2', which adds: > -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow > > Objections? Improvements to the idea? Since -Wno-uninitialized actually turns off some warnings, I think you would want it in WARNS=2 as well. One question: is the WARNS thing intended to be compatible with some other OS? Oh, and -Wcast-align looks like it could be useful in tracking down those pesky alignment faults on non-i386, so putting that in WARNS=4 might be useful. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message