<div dir="ltr">Just did a bit of digging around in the Microsoft documentation and it seems VS2012 and VS2013 support final, override and nullptr.<div><br></div><div><div>There is a lot of info and tables here: <a href="http://msdn.microsoft.com/en-us/library/hh567368.aspx">http://msdn.microsoft.com/en-us/library/hh567368.aspx</a></div>
<div><br></div><div>final: VS2012/2013</div><div>overrride: VS2012/2013</div><div>nullptr VS2010/2013</div></div><div><br></div><div>So you can probably allow their use for these compilers in VTK. Probably somewhere i<font color="#000000">n</font> vtkCompilerExtras.cmake and vtkWin32Header.h.</div>
<div><br></div><div>Actually there is CMAKE_CXX_COMPILER_ID, CMAKE_CXX_COMPILER_VERSION available but I am not sure it</div><div>was accessible in cmake 2.8.8 (the minimum for VTK).</div><div>For VS2013 I get Compiler ID/Version: MSVC 18.0.30723.0 (however I am using CMake 3.1).</div>
<div>CMAKE_CXX_COMPILER_ID returns at least one of "GNU", "MSVC", "Clang".</div><div><br></div><div>Andrew</div><div><br></div><div><br></div><div>Andrew</div><div><br></div><div><br></div><div>
<br></div><div>Andrew</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 23, 2014 at 7:21 AM, Sean McBride <span dir="ltr"><<a href="mailto:sean@rogue-research.com" target="_blank">sean@rogue-research.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Fri, 22 Aug 2014 13:25:54 -0400, Marcus D. Hanwell said:<br>
<br>
>> clang has a warning that warns when gcc extensions are used, as I<br>
>recall there are a few in the VTK codebase, like using C99 VLAs in C++<br>
>files. I'll do a build and see how many warnings pop...<br>
><br>
>I doubt we have many, as we normally make people fix these in review<br>
>and they cause failures on Windows for example.<br>
<br>
</div>So I built with clang and "-std=c++11 -stdlib=libc++ -pedantic -Wno-extra-semi" and there were only a few warnings:<br>
<br>
a) 15 of the form:<br>
<br>
VTK/Filters/General/vtkYoungsMaterialInterface.cxx:2568:5: warning: variable length arrays are a C99 feature [-Wvla-extension]<br>
ALLOC_LOCAL_ARRAY( derivatives, REAL2, nv-1 );<br>
^<br>
VTK/Filters/General/vtkYoungsMaterialInterface.cxx:2201:49: note: expanded from macro 'ALLOC_LOCAL_ARRAY'<br>
#define ALLOC_LOCAL_ARRAY(name,type,n) type name[(n)]<br>
^<br>
<br>
This works in Windows as there is a malloc fallback case.<br>
<br>
<br>
<br>
b) 3 of the form:<br>
<br>
VTK/Rendering/Label/vtkLabelHierarchy.cxx:887:10: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]<br>
if ( &(this->Node->value()) )<br>
~~ ~^~~~~~~~~~~~~~~~~~~~<br>
VTK/Utilities/octree/octree_node.h:48:13: note: 'value' returns a reference<br>
reference value() { return this->_M_data; }<br>
<div class="HOEnZb"><div class="h5"> ^<br>
<br>
Cheers,<br>
<br>
--<br>
____________________________________________________________<br>
Sean McBride, B. Eng <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
Rogue Research <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
Mac Software Developer Montréal, Québec, Canada<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>___________________________________________<br>Andrew J. P. Maclean<br><br>___________________________________________
</div>