On 5 Feb 2004 at 18:37, Francesco Bonomi wrote:
Der friends,
all the comments about possible workarounds to the bug are indeed valid, but I cannot use them because I have to port a large existing application to gpc while keeping binary compatability with existing files.
This would allow me to have a smoother transition from the current program (Oregon Pascal under SCO) to the new program (gpc under Linux). I mean, I can keep the working program running while I port small parts at a time to implement new features up to when I will finish and I will be able to abandon the old program.
As I said in my second message, the structure I am working with is quite complex and I am afraid to break it :-)
[...]
I once had a similar problem, and, with Frank's help, I managed to find a relatively easy solution - which was, instead of doing:
type foo = packed record { blah, blah, fieldx, fieldy, etc. } end;
I would use the pack-struct directive both before and after the type declaration, like this: {$ifdef __GPC__}{$pack-struct, maximum-field-alignment 8} {$endif} type foo = record { blah, blah, fieldx, fieldy, etc. } end; {$ifdef __GPC__}{$no-pack-struct, maximum-field-alignment 0}{$endif}
Seems to achieve the same result, without using "packed record".
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/