This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: long long vs long


At 01:48 PM 7/23/98 -0400, Timothy Writer wrote:
>Furthermore, in section 6.1.2.5 the Standard states, "There are four signed
>integer types, designated as signed char, short int, int, and long int."  It
>then goes on to say, "In the list of signed integer types above, the range of 
>values of each type is a subrange of the values of the next type in the
>list."
>
>In other words,
>
>    sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long)
>
>and
>
>    sizeof(char)  == 1
>    sizeof(short) >= 2
>    sizeof(int)   >= 2
>    sizeof(long)  >= 4
>

Sorry but this doesn't seem to follow.  I agree with the interpretation of
the standard, namely:

  sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long)

However, this does NOT imply what follows (the sizeof lines after the "and".)
The implication from the standard is:

  sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long)

AND

  sizeof(char)  == 1
  sizeof(short) >= 1
  sizeof(int)   >= 1
  sizeof(long)  >= 1

which someone on this list pointed out previously.  I think the key words 
here are that "the range of values of each type is a subrange of the values 
of the next type in the list."  Are we getting a little too far off topic 
for this list?





Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      (781) 239-1053
8 Grove Street                          (781) 239-1655 - FAX
Wellesley, MA  02181                    http://www.rfk.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]