Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 2003 00:45:07 +0100
From:      Maxime Henrion <mux@freebsd.org>
To:        Dag-Erling Sm?rgrav <des@ofug.org>
Cc:        arch@freebsd.org
Subject:   Re: WARNS=6 changes
Message-ID:  <20030316234507.GK3819@elvis.mu.org>
In-Reply-To: <xzpllzfctbx.fsf@flood.ping.uio.no>
References:  <20030313192045.GG3819@elvis.mu.org> <20030316062315.GA75492@dragon.nuxi.com> <xzpof4bcu8b.fsf@flood.ping.uio.no> <xzpllzfctbx.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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