This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
sizeof(long long)
- From: "Svein E. Seldal" <Svein dot Seldal at solidas dot com>
- To: gcc <gcc at gcc dot gnu dot org>
- Date: Tue, 19 Nov 2002 15:28:28 +0100
- Subject: sizeof(long long)
Hi,
Is it a strict requirement of C that "long long" is 64-bits? Or is it
simply that sizeof(long long)>sizeof(long) (or maybe >=)?
In the AVR target, this the sizeof's are distributed as such:
sizeof(char)=1, sizeof(short)=sizeof(int)=2, sizeof(long)=4, sizeof(long
long)=8.
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.
Note that there is a gap between long and long long. No 32-bits types
exists for this mode -- this represents surely a problem when 32-bits
types are wanted. My idead would then to decrease the long long size to
be 32-bit.
I have a patch for it, but I wanted to make sure that this construct is
valid..
Regards,
Svein