mssip.h trouble

Patrik Stridvall ps at leissner.se
Tue Sep 10 13:42:34 CDT 2002


> Patrik Stridvall wrote:
> 
> > On MSVC it does matter in the following example whether n is 4 or 8.
> > Or 16 for that matter eventhough that gives the same result as 8.
> > 
> > #ifdef _MSC_VER
> > typedef __int64 longlong_t;
> > #else
> > typedef long long longlong_t;
> > #endif
> > 
> > #pragma pack(n)
> > typedef struct {
> > 	char x;
> > 	longlong_t y; /* offset is 4 if n = 4, but is 8 if n = 
> 8 or n = 16*/
> > } longlong_n;
> > #pragma pack()
> 
> I would assume that MSVC and GCC use different structure
> layouts even without any #pragma pack(), because the
> default aligment of 8-byte data types is different.
> 
> As I mentioned in my other mail, GCC should use the same
> layout as MSVC if you compile with -malign-double.

As I mention in my other mail you are absolutely correct. :-)

So it seems that if we add a -malign-double to CFLAGS we can
remove the warning in pshpack8.h since now it will hopefully
work correctly. 




More information about the wine-devel mailing list