This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with sizeof (mingw32 and cygwin32)
- To: anmendes at cruzeironet dot com dot br, egcs at cygnus dot com
- Subject: Re: Problem with sizeof (mingw32 and cygwin32)
- From: mrs at wrs dot com (Mike Stump)
- Date: Thu, 23 Jul 1998 17:41:50 -0700
> From: "Antonio M. O. Neto" <anmendes@cruzeironet.com.br>
> To: <egcs@cygnus.com>
> Date: Tue, 21 Jul 1998 12:15:00 -0300
>
> int 4 bytes
> long int 4 bytes
> long long int 8 bytes
> float 4 bytes
> double 8 bytes
> long double 12 bytes
>
> Would not the correct be (in the order) 4, 8, 16, 4, 8, 12 bytes?
No.
int is 32 bits, long is 32 bits, char is 8 bits, 8 bits == 1 byte,
sizeof(char) == 1, char == byte, long long is 64 bits.
:-)
People that think otherwise tempt portability. Also, another way to
answer this question, is what does Microsoft do, as mingw32 tries to
be abi compliant with Microsoft, as I recall.