mssip.h trouble

Patrik Stridvall ps at leissner.se
Tue Sep 10 06:07:31 CDT 2002


> On Tue, 10 Sep 2002, Patrik Stridvall wrote:
> 
> > > While compiling the latest tree, I get this:
> > >
> > > [dimi at dimi wine]$ make -s
> > > In file included from ../../include/mssip.h:49,
> > >                  from main.c:22:
> > > ../../include/pshpack8.h:47:6: warning: #warning "8 as
> > > alignment is not supported"
> [...]
> > It seems that gcc or at least a previous versions of GCC
> > didn't support it since somebody (Alexandre?) added a
> > warning in pshpack8.h.
> 
> It may have been me. I think at the time it was only meant for gcc,
> which was the only things you could compile Wine with anyway.
> The specific version of gcc is 2.95, and but I'm really not sure the
> situation has changed.

It hasn't. GCC 3.1 has the same problem.

> > Futhermore Micrsoft C/C++ (or at least later version of it)
> > contrary to the claim of pshpack8.h support it so it
> > wrong at the point at least AFAIK.
> 
> Yes, Visual C++ supports alignment 8 which is the problem (so that
> defined(_MSC_VER) should have been moved elsewhere, just to avoid the
> warning in fact).
> 
> How we can handle such alignment issues in Wine whn compiled with gcc
> I'm not sure.

Neither am I. I have tested the alignment with various compiler and
got the follow result:

- No GNU C compiler not even 3.1 support #pragma pack(8) nor
  does it support #pragma pack(16). It doesn't even give a warning.
- MSVC 6.0 support #pragma pack(8) but not #pragma pack(16)
- The Solaris compiler (old version) doesn't even support #pragma pack(4),
  but then 4 is the default so it doesn't really matter that much (except
  for a warning). It support #pragma pack(1) and #pragma pack(2) though.

So the conclusion is that only MSVC support #pragma pack(8), nothing else.

I'm totally at loss as to what to do. Not that it currently matters since
the data structures isn't currently used but someday somebody will...

PS. I can't understand why GNU C doesn't support it, it can't be that
difficult
to implement can it? Nether the less that fact that it doesn't warn about
it is even worse. That certainly can't be difficult to implement.



More information about the wine-devel mailing list