This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: long long vs long
- To: donadio at isptechinc dot com
- Subject: Re: long long vs long
- From: dahms at ifk20 dot mach dot uni-karlsruhe dot de
- Date: Tue, 28 Jul 1998 04:14:41 +0200 (METDST)
- CC: gnu-win32 at cygnus dot com, dahms at ifk20 dot mach dot uni-karlsruhe dot de
Hi Matt, you wrote:
: Not to be picky, but to quote K&R II pg. 36:
[snip]
: Also, chars are not limited to be only 8 bits, but they must be at least
: 8 bits. I routinely work on processors (C40, C44) where CHAR_BIT is
: 32. This results in the pecularity that
:
: sizeof(char) = sizeof(long) = 1
:
: which is perfectly legal. I think there is a lot more code in the world
: that asumes that CHAR_BIT is 8 than sizeof(long) is 4.
With sizeof(char) = sizeof(int) = 1 and looking at K&R II pg. 16,
you'd got a problem with getchar() and EOF, if someone invents a
32bit charset and assumes to be able to use them all *and* EOF.
AFAIK the biggest charsets currently are 16bit (e.g. Unicode),
so at the moment you're safe with a 32bit char!
Bye, Heribert (dahms@ifk20.mach.uni-karlsruhe.de)
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".