[Insight-developers] -Wlong-long with > gcc4.5

Johnson, Hans J hans-johnson at uiowa.edu
Thu Sep 1 13:09:18 EDT 2011


Not that wiki-pedia is alway right, but if it is:


http://en.wikipedia.org/wiki/Long_integer

"""
In later C99 <http://en.wikipedia.org/wiki/C99> version of the C
programming language
<http://en.wikipedia.org/wiki/C_(programming_language)>, a long long type
is supported that doubles the minimum capacity of the standard long to 64
bits. This type is not supported by compilers that require C code to be
C++ <http://en.wikipedia.org/wiki/C%2B%2B> ISO
<http://en.wikipedia.org/wiki/International_Organization_for_Standardizatio
n> compliant,

  because the long long type does not currently exist in C++

(it is defined in the new, yet unfinished, C++ standard, C++0x
<http://en.wikipedia.org/wiki/C%2B%2B0x>). For an ANSI/ISO compliant
compiler the minimum requirements for the specified ranges, that is ?(231)
to 231?1 for signed and 0 to 232?1 for unsigned, must be fulfilled;
however, extending this range is permitted.[1]
<http://en.wikipedia.org/wiki/Long_integer#cite_note-0> [2]
<http://en.wikipedia.org/wiki/Long_integer#cite_note-1> This can be an
issue when exchanging code and data between platforms, or doing direct
hardware access. Thus, there are several sets of headers providing
platform independent exact width types. The C standard library
<http://en.wikipedia.org/wiki/Standard_library> provides stdint.h
<http://en.wikipedia.org/wiki/Stdint.h>; this was introduced in C99
<http://en.wikipedia.org/wiki/C99>.
[edit
<http://en.wikipedia.org/w/index.php?title=Long_integer&action=edit&section
=2>]

"""


======================================
I did not mean to use a typedef to "long long" but rather replace "long
long" with "int_64_t" that is defined in itkIntTypes.h

Hans


--
Hans J. Johnson, Ph.D.
hans-johnson at uiowa.edu
Assistant Professor of Psychiatry
University of Iowa Carver College of Medicine
W278 GH, 200 Hawkins Drive

Iowa City, Iowa 52242
Phone:  319-353-8587







-----Original Message-----
From: Bradley Lowekamp <brad at lowekamp.net>
Date: Thu, 1 Sep 2011 12:44:03 -0400
To: Hans Johnson <hans-johnson at uiowa.edu>
Cc: Matt McCormick <matt.mccormick at kitware.com>, ITK
<insight-developers at itk.org>, Arnaud Gelas <arnaudgelas at gmail.com>
Subject: Re: [Insight-developers] -Wlong-long with > gcc4.5


I thought that all compilers we  now support support long long. Also
having a typedef is not going to suppress the warning. I don't think this
warning flag should be added.
Sent from my iPhone

On Sep 1, 2011, at 12:17 PM, "Johnson, Hans J" <hans-johnson at uiowa.edu>
wrote:

> I believe that the correct thing to do is to remove "long long".  That is
> ambiguous and difficult to get correct on many compilers.  It should be
> one of the ITK typedefs from itkIntTypes.h if at all possible.
>
> Hans
>
> --
> Hans J. Johnson, Ph.D.
> hans-johnson at uiowa.edu
> Assistant Professor of Psychiatry
> University of Iowa Carver College of Medicine
> W278 GH, 200 Hawkins Drive
>
> Iowa City, Iowa 52242
> Phone:  319-353-8587
>
>
>
>
>
>
>
> -----Original Message-----
> From: Matt McCormick <matt.mccormick at kitware.com>
> Date: Thu, 1 Sep 2011 12:09:58 -0400
> To: ITK <insight-developers at itk.org>
> Cc: Hans Johnson <hans-johnson at uiowa.edu>, Arnaud Gelas
> <arnaudgelas at gmail.com>
> Subject: [Insight-developers] -Wlong-long with > gcc4.5
>
> Hi,
>
> With the new warning patch, -Wlong-long flag is causing many warnings
> with GCC 4.6:
>
> .../ITK/Modules/Core/Common/src/itkNumericTraits.cxx:70:71: warning:
> use of C++0x long long integer constant [-Wlong-long]
>
> What is the right thing to do here?  Disable the warning
> (-Wno-long-long)?  Remove the long long?
>
> Matt
> _______________________________________________
> 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
>
>
>
> ________________________________
> Notice: This UI Health Care e-mail (including attachments) is covered by
>the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is
>confidential and may be legally privileged.  If you are not the intended
>recipient, you are hereby notified that any retention, dissemination,
>distribution, or copying of this communication is strictly prohibited.
>Please reply to the sender that you have received the message in error,
>then delete it.  Thank you.
> ________________________________
> _______________________________________________
> 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



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-developers mailing list