This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sizeof(long long)
- From: Andreas Schwab <schwab at suse dot de>
- To: "Svein E. Seldal" <Svein dot Seldal at solidas dot com>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Tue, 19 Nov 2002 16:07:28 +0100
- Subject: Re: sizeof(long long)
- References: <3DDA4A8C.6030600@solidas.com>
"Svein E. Seldal" <Svein.Seldal@solidas.com> writes:
|> Hi,
|>
|> Is it a strict requirement of C that "long long" is 64-bits?
LLONG_MAX must be at least 9223372036854775807.
|> Since this is a small microcontroller, it has the -mint8 option, which
|> does the following: sizeof(char)=sizeof(short)=sizeof(int)=1,
|> sizeof(long)=2 and sizeof(long long)=8.
Since INT_MAX must be at least 32767 this implies that CHAR_BIT is at
least 16. So sizeof(long long) can be 4 to be still compliant.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."