|
From: Brian W. <bwe...@xb...> - 2005-09-20 00:25:15
|
On Tue, 20 Sep 2005, Roland Clobus wrote: > If --enable-warnings=yes is used, it will result in the same situation > as the current, except that the warnings will not be enabled when the > compiler is not called gcc (perhaps not a good idea, since it can > also be e.g. gcc-3.3) This could easily be worked around by checking for a --version option and parsing the result if there is one. > But I was experimenting with what would happen if I enabled nearly all > compiler warnings, --enable-warnings=full. It turns out that a few > useful additional warnings were given. > > I've looked in gnome-compiler-flags.m4 (part of the gnome-common > package) for ideas. It contains an AM_macro that enables compiler > warnings, but they are less strict than the collection of warnings we > currently use. It think we should at least keep the current list of > warning checks. > > However, gnome-compiler-flags.m4 contains a nice for loop that will > check the capability of gcc to use a certain -Wflag. Perhaps that can > be used to determine the available gcc warning flags. Sounds good. > --enable-warnings: for compiler warnings > --enable-debug: for -ggdb3 and -O > --enable-logging: for -DDEBUG > --enable-deprecation-checks -D*_DISABLE_DEPRECATED > --enable-developer-only I'm not sure why we'd want to set -O if --enable-debug is specified; it makes debugging harder. I could actually see setting -O if --enable-warnings is specified, since gcc stupidly only prints certain types of warning if optimization is enabled. > developer-only would turn on all four. > ./configure --enable-developer-only --disable-logging should then be > able have all warnings and debug information, but without the > logging. I like that idea. > Using CFLAGS should work again. Good. >>>> I could try to come up with a patch to do this if there's >>>> interest, but I'm not going to fight with autoconf unless >>>> there's consensus. > > I've made many changes to the autoconf script already. It would not be > hard for me to implement the mentioned changes. OK. >> Agreed. Your patch is definitely an improvement over the current code, >> and should be applied. The we can figure out what the best way to move >> forward from there. > > Agreed. > But since I've put some time into this, and I might as well finish my > patch, I would like to propose the following: > In about 18 hours from now I can spend some time for Pioneers again. > If I don't have a patch posted in 24 hours from now, let's apply the > patch from Bas, otherwise look at the new patch. I'm ok with this too. Brian |