Mail Archives: djgpp/1996/04/02/11:02:45
One problem might be that you declare structs with packed fields and use
the size of struct modeinfo in one of the variants (but not in the
other). GCC 2.7.2 has a known bug in its C++ compiler: it doesn't pack
structs even if you use __attribute__((packed)), so you might use a wrong
struct layout and size.
To make GCC pack the structures, surround the code with these (I hope I
get this right; to be sure, search the DJGPP mailing archives for
`pragma' as keyword):
#ifdef __cplusplus
#pragma pack(1)
put here the code that declares packed structures
#pragma pack()
#endif
- Raw text -