[Insight-developers] ITK and gcc 4.4.0

Arnaud Gelas arnaud_gelas at hms.harvard.edu
Wed Jun 10 10:47:34 EDT 2009


Luis,

By initializing m_InternalArray in itk::FixedArray, it would reduce a 
lot the number of warning.
Should we initialize all values to zero by default?

Arnaud

Arnaud Gelas wrote:
> Hi Luis,
>
> I have updated the OS from Fedora Core 10 to Fedora Core 11, and the 
> default compiler is now gcc 4.4.0
>
> Arnaud
>
> Luis Ibanez wrote:
>   
>> Hi Arnaud,
>>
>> Thanks for pointing this out.
>>
>> The warning
>>
>> **
>> /.../Insight/Utilities/gdcm/src/gdcmDocument.cxx:2182: warning: dereferencing type-punned pointer will break strict-aliasing rules
>>
>>   
>> **
>>  for the expression:
>>
>>    char deb[256];
>>    uint16_t  s16;
>>
>>    s16 = *((uint16_t *)(deb));
>>
>>
>> Indicates a real problem.
>>
>>
>> I believe, the correct way of performing this conversion
>> is by using a union {}.
>>
>>
>> We may have to rework some expressions to fix these
>> warnings.
>>
>>
>> Just out of curiosity:
>> Did you updated gcc as a package ?
>> or did you build it in your system ?
>>
>>
>>
>>    Thanks
>>
>>
>>       Luis
>>
>>
>> ---------------------------------------
>> On Wed, Jun 10, 2009 at 9:31 AM, Arnaud Gelas 
>> <arnaud_gelas at hms.harvard.edu <mailto:arnaud_gelas at hms.harvard.edu>> 
>> wrote:
>>
>>     Hi guys,
>>
>>     Yesterday I updated sanchome's OS. From last night this machine
>>     has now gcc 4.4.0 installed (despite it was reported gcc 4.3.2 on
>>     the dashboard).
>>     Apparently it has generated a lot of warnings...
>>
>>     http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=352211
>>     <http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=352211>
>>     http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=352274
>>     <http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=352274>
>>
>>     Regards,
>>     Arnaud
>>     _______________________________________________
>>     Powered by www.kitware.com <http://www.kitware.com>
>>
>>     Visit other Kitware open-source projects at
>>     http://www.kitware.com/opensource/opensource.html
>>
>>     Please keep messages on-topic and check the ITK FAQ at:
>>     http://www.itk.org/Wiki/ITK_FAQ
>>
>>     Follow this link to subscribe/unsubscribe:
>>     http://www.itk.org/mailman/listinfo/insight-developers
>>
>>
>>     
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>   



More information about the Insight-developers mailing list