Re: Deferencing type-punned pointers, and how to stop gcc giving youa warning



Hi,

On Wed, 2004-04-28 at 15:50, Colin Walters wrote:
> On Wed, 2004-04-28 at 10:32, Jody Goldberg wrote:
> > On Wed, Apr 28, 2004 at 12:41:01AM -0400, Colin Walters wrote:
> > > 
> > > -ansi breaks a ton of stuff.  We want to be able to use GCC extensions
> > > where available.  The best way in my opinion is to use -std=c89, along
> > > with -Wall -Werror and a bunch of other -Wblah flags.
> > 
> > Please do not use -Werror.  There are many instances where slight
> > platform differences (different distros, different versions of
> > distros etc) will cause warnings.  
> 
> And 95% of the the time those are real bugs that need to be fixed.  Note
> that with the way the code works, the CFLAGS are only appended if the
> code was checked out from cvs/arch.  So tarball builds are never
> impacted.

	IMHO, -Werror is a developers tool. If you're not actually *hacking* on
that module you should never see -Werror. It just causes pain for people
who aren't usually in a position to do anything about it.

	My strategy:

  + GNOME_COMPILE_WARNINGS(yes) in configure.in

  + build anything I'm working on with --enable-compile-warnings=error

  + encourage other people hacking on stuff to do the same

Cheers,
Mark.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]