www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/02/11:02:45

Date: Tue, 2 Apr 1996 17:54:10 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
Cc: DJGPP AT delorie DOT com
Subject: Re: Odd happenings with an interrupt
In-Reply-To: <1DC6EB3C23@fs2.mt.umist.ac.uk>
Message-Id: <Pine.SUN.3.91.960402174913.15267C-100000@is>
Mime-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019