Boost logo

Geometry :

Subject: [ggl] Compilation warning level
From: Mateusz Loskot (mateusz)
Date: 2009-05-03 11:21:52


Barend Gehrels wrote:
>> I've noticed that most of Visual C++ projects have warning level
>> set to /W1. It isn't much helpful for development.
>> So, I'm going to change it to (at least) /W3, if you don't mind.
>
> I agree. It surprised me so I looked at it immediately. Normally I
> always compile with warnings on.
>
> I'm now getting what was set why.
>
> In most examples they were all turned on. However, because GD produces
> as lot of warnings, they were off.

I see.

> And because the projections
> (converted from PROJ4) also produces warnings, they were also turned off.

Right, this part generates a lot of warnings, most about missing {}
around aggregates initializers.

> I noticed that many examples were removed from geometry_examples.sln?
> This was probably because of those warnings? I think they should all be
> there...

Yes, I've remove them but temporarily.
The I removed all examples that did/do not compile for me.

> Is it possible to add the warning level in the property sheet?
> Then it is easier to configure.

Sure it is, but then all projects must be configured to "inherit" this
setings. I'll do it.

> In most tests they were turned off. The tests sometimes deliberately mix
> float/double and this produce a lot of irrelevant warnings. But I still
> agree, we should have them on or at least compile with warnings on a
> regular base.
>
> I just solved one or two warnings in the new testfiles :-)

OK. It's good to not to silent warnings, or to silent only
those which are not solvable and annoying :)

>> In Jamfiles, I'm going to add -pedantic option for GCC.
>
> I want to react on this anyway (your other mail on CMake). I use
> Microsoft and gcc all the time. Because I still don't use bjam I had my
> own shellscript to compile gcc. Since I use MinGW (before that I used
> cygwin), I have a makefile, which is not checked in because there was
> already bjam and vcproj and it is not a beauty.

I see.
I've never used GCC from Cygwin or MinGW, so I lack of knowledge how
they behave / configure.

> I had warnings first turned on but probably by projections again, or the
> same reasons, they were put off.
>
> I added -pedantic to this this week, thanks for the hint.

Perhaps in future we can improve the generator of projection layer,
so it eliminates warnings.

> So in summary, good you point it out, I agree, warnings are often
> helpful and the stuff should compile without warnings.

OK

Best regards,

-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org

Geometry list run by mateusz at loskot.net