[Insight-developers] Windows 64 bits & unsigned long

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Nov 12 10:56:45 EST 2009


Le 12 nov. 09 à 16:31, Gaëtan Lehmann a écrit :

>
> I think there is an equivalent option in sun studio, but IIRC, it  
> produces a lot of warnings.
> If you think that's useful, I can try to turn it on in an  
> experimental build.

To be a bit more clear, here is the relevant information in the man  
page:

      -xport64[=v]
                Use this option to help you port code to a 64-bit
                environment. Specifically, this option warns
                against problems such as truncation of types
                (including pointers), sign extension, and changes
                to bit-packing that are common when you port code
                from a 32-bit architecture such as V8 to a 64-bit
                architecture such as V9.

                Values:

                v must be one of the following values.

                Value          Meaning

                no             Generate no warnings related to the
                               porting of code from a 32 bit
                               environment to a 64 bit environ-
                               ment.

                implicit       Generate warning only for implicit
                               conversions. Do not generate warn-
                               ings when an explicit cast is
                               present.

                full           Generate all warnings related to
                               the porting of code from a 32 bit
                               environment to a 64 bit environ-
                               ment. This includes warnings for
                               truncation of 64-bit values, sign-
                               extension to 64 bits under ISO
                               value-preserving rules, and changes
                               to packing of bitfields.



>
> Gaëtan
>
>
> Le 12 nov. 09 à 15:13, Luis Ibanez a écrit :
>
>> Sean,
>>
>> Excellent idea.
>> Yes, have an Experimental will this flag on will be useful.
>> (I'll set up one in thurmite.kitware too, so  we have two
>> points of reference).
>>
>> Also, I'll search for an equivalent flag for VS9.
>>
>>
>>   Thanks,
>>
>>         Luis
>>
>>
>> -----------------------------------------------------------------------------------
>> On Wed, Nov 11, 2009 at 12:51 PM, Sean McBride <sean at rogue-research.com 
>> > wrote:
>>> On 11/11/09 12:36 PM, Luis Ibanez said:
>>>
>>>> It seems to be a good time to resume the effort
>>>> for fixing the use of integers in Windows 64 bits.
>>>>
>>>> *SNIP*
>>>>
>>>> Any suggestions on how to go about it in an efficient way ?
>>>
>>> Perhaps during this work, it would be beneficial to enable gcc's -
>>> Wshorten-64-to-32 warning?  Alas, last I checked, the warning exists
>>> only in Apple's fork of gcc.  I imaging Windows compilers have a  
>>> similar
>>> option.  This warning would warn on the following for example:
>>>
>>> unsigned int size = sizeof (foo);
>>>
>>> If you're going to change the size/type of many variables, it  
>>> seems like
>>> the time.
>>>
>>> We could provide an experimental nightly with this on.
>>>
>>> --
>>> ____________________________________________________________
>>> Sean McBride, B. Eng                 sean at rogue-research.com
>>> Rogue Research                        www.rogue-research.com
>>> Mac Software Developer              Montréal, Québec, Canada
>>>
>>>
>>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.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
>
> -- 
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr  http://www.itk.org
> http://www.mandriva.org  http://www.bepo.fr
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.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

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20091112/95734859/attachment-0001.pgp>


More information about the Insight-developers mailing list