[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Suppressing GCC's "uninitialised" warnings [was: svn commit: r18040 ...]

From: Branko ─îibej <brane_at_xbc.nu>
Date: 2006-01-19 07:37:36 CET

Julian Foad wrote:
> Daniel Rall wrote:
>> I didn't realize that CFLAGS already contained -Wall. It's not
>> explicitly added by our configure process, but I see it in Makefile.
>> Perhaps it's inherited from httpd or APR.
>> Using CFLAGS instead of an override which always turns off that type
>> of warning is easy enough (see below), but it seemed less appropriate
>> given the situation (since people can still easily shoot themself in
>> the foot). What do you think?
> This warning only seems to occur in this situation (the r18040
> situation: passing "&var" to a local function which either initialises
> "var" or returns an error) if the option "-funit-at-a-time" is given,
> as Philip mentioned. Furthermore it is only a problem when "-Werror"
> is also given. But note well that the same warning can be produced in
> other situations, such as simple use of the value of a variable before
> it is initialised.
> I think maybe trying to suppress "uninitialised" warnings is trying to
> be too clever. It's nice to provide a warning-free build when invoked
> with just the default options, but if someone is adding extra flags it
> is up to them to specify the flags they need to get the effect they want.
> Suppressing all "uninitialised" warnings, even when "-funit-at-a-time"
> and "-Werror" are not given, may hurt more people than it helps.
> Therefore I think we should not do this.
I agree. If for no other reason, then because a) there are lots of
versions of GCC out there, only some of which are affected by this
problem; and b) surely a future version of GCC will do better in this
case, especially if someone reports the bug to them (hint, hint!)

-- Brane

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 19 07:37:54 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.