From owner-freebsd-arch Sun Mar 16 15:45: 9 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 0EB6937B401 for ; Sun, 16 Mar 2003 15:45:08 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5274943F3F for ; Sun, 16 Mar 2003 15:45:07 -0800 (PST) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 2FA4F2ED407; Sun, 16 Mar 2003 15:45:07 -0800 (PST) Date: Mon, 17 Mar 2003 00:45:07 +0100 From: Maxime Henrion To: Dag-Erling Sm?rgrav Cc: arch@freebsd.org Subject: Re: WARNS=6 changes Message-ID: <20030316234507.GK3819@elvis.mu.org> References: <20030313192045.GG3819@elvis.mu.org> <20030316062315.GA75492@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Dag-Erling Sm?rgrav wrote: > des@ofug.org (Dag-Erling Sm?rgrav) writes: > > Hmm, I think it should be a separate knob. We can merge it into WARNS > > later, but for now, we should just remove -ansi / -pedantic from > > WARNS, and add a CSTD knob which can be either c89 or c99. > > See the attached patch. I don't like it. I don't want yet another knob to be added in every damn Makefile in the tree. We should warn by default for these things. Since we adopted GCC3 and often use C99 features these days, it seems clear C99 should be the default standard for warnings. We may need to disable these warnings, but it should be exceptional cases only. We may need to use another C standard for the warnings, but it should be exceptional cases only. With the patch I provided, we can handle these exceptional cases, by lowering the WARNS level for the first case, and by using the WSTD variable for the second case. We also have useful and meaningful default setting, se we don't need to go add another knob in every Makefile when we want to enable warnings about C standard errors. I agree with Bruce when he says that we should even enable these warnings at WARNS=1, which again goes to show that not checking standard warnings by default and requiring a knob to be set for it is a bad idea. Cheers, Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message