This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sizeof(long long)


"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."


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