delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/22/02:20:12

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Tue, 22 Jan 2002 09:19:05 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: RazorSliph <sliph AT gmx DOT net>
Message-Id: <3405-Tue22Jan2002091904+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <6kvo4ukaf4ceud3gn6pp0ut7t08jsup0kv@4ax.com> (message from
RazorSliph on Mon, 21 Jan 2002 15:57:26 -0500)
Subject: Re: -fpack-struct issues
References: <6kvo4ukaf4ceud3gn6pp0ut7t08jsup0kv AT 4ax DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: RazorSliph <sliph AT gmx DOT net>
> Newsgroups: comp.os.msdos.djgpp
> Date: Mon, 21 Jan 2002 15:57:26 -0500
> 
> Greetings! I need to compile an application using the -fpack-struct so
> that the structures generated (and written to disk) are identical to
> the saved structures created by another program.  The structures,
> unfortunately, are 10 bytes wide, and get padded to 12 bytes with a
> base compile.

See section 22.11 of the DJGPP FAQ list, it explains the issues
involved and suggests several possible solutions.

> However, whenever I compile with the -fpack-struct option, the
> resulting executable segfaults. (GPF's)

That's expected, since you include headers which define structures
used by C++ library functions, and those library functions were not
compiled with -fpack-struct.  So you introduced an incompatibility
between the library and your program.  This is also exlpained in the
FAQ.

In general, I find -fpack-struct to have too many limitations to be
of practical use for what you want to do.  Use one of the other
methods described in the FAQ.

- Raw text -


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