Subject: Re: [geometry] Compiler warnings in geometry 1.50.0: geometry\algorithms\correct.hpp(138): error C4127: conditional expression is constant
From: Barend Gehrels (barend_at_[hidden])
Date: 2012-07-08 17:16:30
On 6-7-2012 15:30, Volker Schöch wrote:
> Hi all,
> I'm in the process of switching our project from 1.48 to 1.50. There
> were some warnings in geometry 1.48 that seem to have been resolved.
> Thank you! On the other hand, there are new warnings in geometry 1.50.
> IMO, these warnings should be eliminated (for a couple of reasons, one
> being that they clutter the output window and obscure new/unknown
> warnings that may be important).
> I am compiling with MS VC++ 10 for 32 bit. My polygon type is oriented
> counter-clockwise and not closed, my point type is based on int.
This is a level 4 warning (/W4). I'm afraid we can't resolve all these
warnings. Level 3 is the default level and makes sense. We also try to
satisfy all gcc warnings.
However, level 4 is often too much for template compilation, if I remove
this condition (which is indeed constant because it depends on the
template path) I've to create extra specializations only for this,
making the code less clear.
The other warning you report (local variable is initialized) ís used,
but because the compiler expression before depends on a template, that
branch is discarded by the compiler.
These types of warnings are IMO too much. Maybe we can work on it if
everything is done, but for the moment the priorities are different I think.
Could you use level 3 in your environment?
Geometry list run by mateusz at loskot.net