http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48547
--- Comment #4 from Jim Michaels <jmichae3 at yahoo dot com> 2011-04-11 04:27:38 UTC --- by the way, in dealing with packed structures in code, I don't know how it is normally handled in compilers and system libraries such as Win32, Mac OS X, and Linux because I haven't taken time time to look at the code, but it were me, I would just turn on the -pack-struct switch and let the compiler do it all. I have a number of programs that use structures, and I don't know of compiler-specific ways of doing structure packing using pragmas or whatever. I am learning though. but I think this is an important compiler switch which should not be ignored. after all, it's there, and it's for making sure sructures get packed. My thinking was, if the libraries are not written in a way so that they handle being packed, then something needs to be fixed so that they can. I had at least 1 or 2 important programs out of 26 I could not write or had to completely rewrite because of packing problems in gcc. I think if you include iterator, vector, and string in a separate file with -pack-struct, it causes the same error, because somehow it includes iostream. catch-22 if you want to get any real work done! this example is pack-struct2.*