View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011051VTK(No Category)public2010-07-28 12:432016-08-12 09:55
ReporterMike Jackson 
Assigned ToKitware Robot 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0011051: vtkTIFFReader compile Error - calls protected method of vtkTiffReader from outside of class
DescriptionI am getting the following compiler error for VTK 5.6

[ 57%] /Users/Shared/OpenSource/VTK/IO/vtkTIFFReader.cxx:811:19: error: 'EvaluateImageAt' is a protected
     member of 'vtkTIFFReader'
           self->EvaluateImageAt(image+imagepos, static_cast<T*>(buffer)+tilepos);
                 ^
In file included from /Users/Shared/OpenSource/VTK/IO/vtkTIFFReader.cxx:15:
/Users/Shared/OpenSource/VTK/IO/vtkTIFFReader.h:116:7: note: declared protected here
 int EvaluateImageAt( void*, void* );
     ^
/Users/Shared/OpenSource/VTK/IO/vtkTIFFReader.cxx:829:47: error: 'GetInternalImage' is a protected
     member of 'vtkTIFFReader'
 unsigned int isize = TIFFScanlineSize(self->GetInternalImage()->Image);
                                             ^
In file included from /Users/Shared/OpenSource/VTK/IO/vtkTIFFReader.cxx:15:
/Users/Shared/OpenSource/VTK/IO/vtkTIFFReader.h:114:26: note: declared protected here
 vtkTIFFReaderInternal *GetInternalImage() { return this->InternalImage; }
                        ^
/Users/Shared/OpenSource/VTK/IO/vtkTIFFReader.cxx:852:21: error: 'EvaluateImageAt' is a protected
     member of 'vtkTIFFReader'
       inc = self->EvaluateImageAt( image,
                   ^
In file included from /Users/Shared/OpenSource/VTK/IO/vtkTIFFReader.cxx:15:
/Users/Shared/OpenSource/VTK/IO/vtkTIFFReader.h:116:7: note: declared protected here
 int EvaluateImageAt( void*, void* );
     ^

Looking at where those errors occur reveals that they are in template functions inside of ReadTiledImage and ReadScanlineImage in the vtkTIFFReader.cxx file. These functions appear never to be used anywhere in the code but if they _do_ get used then a compile error will be thrown at that point. The functions probably need to be moved to the vtkTIFFReader.h file instead of in the vtkTIFFReader.cxx file or the functions need to be removed if they are not being used at all.

I submitted a bug report to the clang project and got the following response:

http://llvm.org/bugs/show_bug.cgi?id=7737 [^]
This is a mistake in the vtkTIFFReader code. clang is much stricter about what
is allowed inside templates, checking as much as it can. The checking which
clang does is allowed by the standard.

In particular, the expression in question is not dependant on any template
parameters, so it is legal for the compiler to check it when it first sees the
template.

Currently I have #if 0 around the code in order for the vtkTiffReader to compile. GCC and Visual Studio continue to compile and pass all tests accordingly.

This is using
515:[mjackson@ferb:clang]$ clang --version
clang version 2.8 (trunk 109582)
Target: x86_64-apple-darwin9
Thread model: posi
___________________________________________________________
Mike Jackson www.bluequartz.net
Principal Software Engineer mike.jackson@bluequartz.net
BlueQuartz Software Dayton, Ohio
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0037187)
Kitware Robot (administrator)
2016-08-12 09:55

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2010-07-28 12:43 Mike Jackson New Issue
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:55 Kitware Robot Note Added: 0037187
2016-08-12 09:55 Kitware Robot Status expired => closed
2016-08-12 09:55 Kitware Robot Resolution open => moved
2016-08-12 09:55 Kitware Robot Assigned To => Kitware Robot


Copyright © 2000 - 2018 MantisBT Team