Re: GNOME CVS: gnome-core martin
- From: Martin Baulig <martin home-of-linux org>
- To: Maciej Stachowiak <mjs noisehavoc org>
- Cc: jacob berkman <jacob ximian com>, gnome-hackers gnome org
- Subject: Re: GNOME CVS: gnome-core martin
- Date: 13 Aug 2001 15:15:14 +0200
Maciej Stachowiak <mjs noisehavoc org> writes:
> If you really want a build to stay warning-free, you need -Werror to
> be the default. Otherwise, the few people who use it will spend too
> much of their time cleaning up after the people who don't. If someone
> really needs to build and can't fix the warnings, they can take the
> extra step of turning them off.
>
> Not that I have any say on what the flags are for gnome-core - but
> I've noticed that modules which default to -Werror on generally have
> no warnings, whereas every gnome2 module that doesn't, gtk+ included,
> has a fair amount of warnings in the build, and build warnings tend to
> stick aroud long enough that I think most people who claim to do
> special cleanup passes to fix warnings are mistaken in their
> recollection.
Well, the problem in gnome-core is that these are not just "warnings",
but real errors - 95% of all "warnings" I get in gnome-core are missing
function prototypes - and in the special case of gnome-core, there's a
95% chance that a missing function prototype means that the function
doesn't exist anymore (in GTK+, libgnome, whereever).
It's just more convenient for to get a compiler error (and I can still do
a "make -k" if I want) than just getting a warning and an undefined symbol
later on - but "later on" means when linking - and for shared libraries
at runtime.
I don't want my code to compile and then crash at runtime due to undefined
symbols in one of my shared libraries - I prefer getting a compiler error
so that I can fix the undefined symbol right away.
> > besides the fact these cflags are gcc specific.
>
> It's best to enable -Werror only when compiling with gcc - nautilus is
> an example of a module that gets this right (or bonobo-activation if
> you want a GNOME2 example).
It's a macro in gnome-common/macros2 which checks whether it's GCC - and
for --enable-compile-warnings=error, it also includes some GCC-specific
compiler warnings, but checks whether the compiler actually supports them.
> Anyway, I hope -Werror continues to be used more. Many warnings are
> real bugs!
Yes, especially in gnome-core.
--
Martin Baulig
martin gnome org (private)
baulig suse de (work)
_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]