[Insight-developers] warnings in vnl_math

Sean McBride sean at rogue-research.com
Thu Mar 11 15:13:37 EST 2010


On Thu, 11 Mar 2010 15:06:30 -0500, Arnaud GELAS said:

>By adding -Wconversion lots of warnings appear from vnl, vxl, gdcm, and 
>itk classes...
>
>I can set up a nightly build with -Wconversion, and start tracking some 
>of these issues (at least the one in itk), but what about the one coming 
>from external libraries?

-Wconversion has very different meaning depending on the version of
gcc.  In versions previous to 4.3 the warning is, IMNSHO, useless; I
would not worry about warnings it generates.  As of 4.3 however, the
warning is useful again, see;

<http://gcc.gnu.org/gcc-4.3/changes.html>

"The -Wconversion option has been modified. Its purpose now is to warn
for implicit conversions that may alter a value. This new behavior is
available for both C and C++. Warnings about conversions between signed
and unsigned integers can be disabled by using -Wno-sign-conversion. In C
++, they are disabled by default unless -Wsign-conversion is explicitly
requested. The old behavior of -Wconversion, that is, warn for
prototypes causing a type conversion that is different from what would
happen to the same argument in the absence of a prototype, has been
moved to a new option -Wtraditional-conversion, which is only available
for C."

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the Insight-developers mailing list