[vtkusers] VTK with gcc 6

Ben Boeckel ben.boeckel at kitware.com
Thu Jul 28 11:04:11 EDT 2016


On Thu, Jul 28, 2016 at 11:43:32 +0200, Alexandre Ancel wrote:
> As a follow-up to my previous mail,
> VTK 5 does not seem to build with gcc 6.1.0 despite the configuration tweak.
> 
> I end up having the following errors in vtkMath.h:
> In static member function 'static int
> vtkMath::GetScalarTypeFittingRange(double, double, double, double)':
> error: narrowing conversion of '9223372036854775807l' from 'long int' to
> 'double' inside { } [-Wnarrowing]
>      };
> error: narrowing conversion of '18446744073709551615ul' from 'long unsigned
> int' to 'double' inside { } [-Wnarrowing]
> error: narrowing conversion of '9223372036854775807ll' from 'long long int'
> to 'double' inside { } [-Wnarrowing]
> error: narrowing conversion of '18446744073709551615ull' from 'long long
> unsigned int' to 'double' inside { } [-Wnarrowing]

Not surprising; what happens if you turn use -std=c++03 (gnu++14 is the
default in GCC 6)?

> > It might be a good idea to also add 7 to future proof the versions or
> > modify the expression so that future iterations of gcc do not pose problems.

VTK master already supports up to GCC 9 :) .

--Ben


More information about the vtkusers mailing list