[GRASS5] Problems compiling and running GRASS6.CVS

Glynn Clements glynn at gclements.plus.com
Wed Apr 5 17:59:15 EDT 2006


Markus Neteler wrote:

> > > > [The current default setting of CFLAGS_WARNING enables too many
> > > > warnings, resulting in significant warnings getting lost in the noise. 
> > > > I'll change that.]
> > > 
> > > what are the recommended gcc settings for pedantic developers to use?
> > 
> > If you're compiling a specific module which you're working on, the
> > default setting (-Wall -Wconversion -Wno-implicit-int) is probably
> > appropriate. Otherwise, it should be empty, so that you only get the
> > compiler's default warnings.
> > 
> > FWIW, I wouldn't suggest trying to eliminate all of the warnings
> > arising from -Wconversion; just check that they don't indicate flaws
> > in your code.
> > 
> 
> I am using
> CFLAGS="-g -Wall -pedantic -Werror-implicit-function-declaration -fno-common"
> 
> for long time now which seems to be quite successfully as it
> - stops on severe problems (so, nothing get's lost in noise then)
> - traps most wrong/absent declarations

Note that CFLAGS_WARNING is appended to the compilation command
regardless of the CFLAGS setting.

I intend to remove the references to CFLAGS_WARNING; the user should
use CFLAGS as above to select the warning switches.

The actuall setting of CFLAGS_WARNING comes from SC_CONFIG_CFLAGS in
aclocal.m4. I'm not sure if it was there originally or added later.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list