This is the mail archive of the gcc-patches@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]

Problem with sizeof (mingw32 and cygwin32)



Hello

Executing the program below:
#include " stdio.h "

main ()
{  
   printf (" int %i bytes\n ", sizeof(int));  
   printf (" long int %i bytes\n ", sizeof(long int));  
   printf (" long long int %i bytes\n ", sizeof(long long int));  
   printf (" float %i bytes\n ", sizeof(float));      
   printf (" double %i bytes\n ", sizeof(double));    
   printf (" long double %i bytes\n ", sizeof(long double));      
}  
  
I obtain as exit (mingw32):  
  
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?  
--the long double is the only defined in the i386.h as being of 96 bits (12 bytes)  
  
If the correct goes this, I send soon the correction patch.

Antonio Mendes de Oliveira Neto (anmendes@cruzeironet.com.br)








i386.h.diff


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