[Insight-developers] Casting constructors for DTI and Sym Mat pixeltypes : Sun CC 5.6 compilation error fixed.

Luis Ibanez luis.ibanez at kitware.com
Sat Apr 10 12:43:14 EDT 2010


Luke,

More on this.

It looks like the amount of types / macros used in the
numeric traits for Tensor and FixedArray types were
too much for the Sun CC 5.6 compiler to handle.

We have resorted to split these two files in two pieces
each to give a better chance to this compiler to manage
the compilation unit.

You will find now the files:

  Insight/Code/Common/
        itkNumericTraitsTensorPixel2.cxx
        itkNumericTraitsTensorPixel.cxx
        itkNumericTraitsFixedArrayPixel.cxx
        itkNumericTraitsFixedArrayPixel2.cxx


Each of them with half of the type instantiations.


   Luis


------------------------------------------------------------------
On Fri, Apr 9, 2010 at 5:40 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:

>
> Hi Luke,
>
> It looks like we have solved the mystery of the
> compilation error in the Sun CC 5.6 compiler.
>
>
> The culprit was an unnecessary semicolon    :-/
>
>
> The relevant change is here:
>
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkSymmetricSecondRankTensor.h?root=Insight&r1=1.28&r2=1.29&sortby=date
>
>
> The semicolon at the end of:
>
>  template < typename TCoordRepB >
>  SymmetricSecondRankTensor( const
> SymmetricSecondRankTensor<TCoordRepB,NDimension> & pa ):
>    BaseArray(pa) { };
>
> is unnecessary,
> and confused the Sun  CC 5.6 compiler.
>
>
> This is one of the cases in which reading the compiler
> error messages in reverse order would have been useful.
>
>
> The real cause of the problem is in the last messages of:
>
> http://www.cdash.org/CDash/viewBuildError.php?buildid=582248
>
> Specifically:
>
> "/.../Insight/Code/Common/itkSymmetricSecondRankTensor.h", line 114: Error:
> "}" expected instead of ";".
>
>
> Curiously,
> KWStyle should have warned us of that semicolon,
> since it is a violation of the ITK coding style.
>
>
> In any case,
> We should be back to a green Dashboard tomorrow.
>
>
> ---
>
> Note that we also removed a number of unnecessary
> #includes of DiffusionTensor3D in related files.
>
>
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkDiffusionTensor3D.h?root=Insight&r1=1.13&r2=1.14&sortby=date
>
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkNumericTraitsDiffusionTensor3DPixel.h?root=Insight&r1=1.2&r2=1.3&sortby=date
>
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkNumericTraitsTensorPixel.h?root=Insight&r1=1.13&r2=1.14&sortby=date
>
>
>
>   Regards,
>
>
>       Luis
>
>
>
> -------------------------------------------------------
> On Mon, Mar 22, 2010 at 1:22 AM, Karthik Krishnan <
> karthik.krishnan at kitware.com> wrote:
> > A quick sanity check would be compare this class with itk::Vector .
> > Both derive from itk::FixedArray and the templated methods added
> > should look identical.
> >
> > thanks
> >
> > On Thu, Mar 18, 2010 at 8:47 AM, Luke Bloy <luke.bloy at gmail.com> wrote:
> >> Hi Luis,
> >>
> >> Thanks for looking into it.
> >>
> >> I committed some changes yesterday that I think should solve the VS6.0
> >> problem. However the SunOS-CC-5.6 is still having problems.
> >>
> >>
> >> -Luke
> >>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100410/de8d95bd/attachment.htm>


More information about the Insight-developers mailing list