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]

Re: Problem with sizeof (mingw32 and cygwin32)


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


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