Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

GCC 4.7.0 breaks __attribute__((packed)) behavior on... (Developers)

posted by RayeR Homepage, CZ, 05.09.2012, 19:09
(edited by RayeR on 05.09.2012, 19:22)

> > I understand this was done for some reasons of compatability with M$
> and/or
> > 64bit stuff but I don't agree with this way.
>
> But if they left it incompatible with MSVC, other people would complain.
> You can't please everybody, something had to change. (Though, again, this
> may indeed be a bug where "packed" should always be minimal, but I vaguely
> doubt it.)

But the problem is in time sequence. From the beginning the mingw used -mno-ms-bitfields as default and when somebody needed to be compatible with MS code he suppressed this by -mms-bitfields in makefile. And it worked for about 10 years. But most of GNU libs was compiled by default with -mno-ms-bitfields. Now they change it and it affect all existing sources, makefiles and precompiled libs. This is the most problem I see.

> "-Wpadded

I tried Wpadded and it's silent :\

> Two attributes are currently defined for i386 configurations: ms_struct and
> gcc_struct

Yeah, interesting. I tried
__attribute__ ((gcc_struct, __packed__))
together and this enforced real packing. Thanks. So in my code I can add gcc_struct everywhere needed but still need to modify makefiles of older libs. Since what gcc version was gcc_struct supported? Will older gccs safely ignore it?

EDIT:
gcc_struct
Found in versions: 3.4

So it exist quite a long time...

---
DOS gives me freedom to unlimited HW access.

 

Complete thread:

Back to the forum
Board view  Mix view
22761 Postings in 2121 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum