On Sat, Apr 9, 2011 at 7:20 PM, Jim Michaels <[email protected]> wrote:
> the point is, I shouldn't have to modify the code. it should be done with
> compiler switches.
> unless your method of "packing" is compiler independent.
>
> the compiler shouldn't balk when I throw the -fpack-struct switch. so why
> did they even make the switch if it's not going to work?
> actually, it only works in ANSI C code. I will grant you that. so it only
> half works. :-/
> Jim Michaels
>
If you read the fine doc's you will learn
`-fpack-struct[=N]'
Without a value specified, pack all structure members together
without holes. When a value is specified (which must be a small
power of two), pack structure members according to this value,
representing the maximum alignment (that is, objects with default
alignment requirements larger than this will be output potentially
unaligned at the next fitting location.
*Warning:* the `-fpack-struct' switch causes GCC to generate code
that is not binary compatible with code generated without that
switch. Additionally, it makes the code suboptimal. Use it to
conform to a non-default application binary interface.
Danny
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public