www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/15/08:49:55

Xref: news2.mv.net comp.os.msdos.djgpp:1860
From: rossi AT cs DOT unibo DOT it (Davide Rossi)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Packed Align bug in G++ 2.7.2??
Date: 14 Mar 1996 18:26:33 GMT
Organization: Department of Computer Science, University of Bologna, Italy
Lines: 22
Message-ID: <4i9ocp$mie@sirio.cineca.it>
References: <199603110922 DOT EAA15978 AT delorie DOT com>
NNTP-Posting-Host: liu.cs.unibo.it
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Martynas Kunigelis (martynas DOT kunigelis AT VM DOT KTU DOT LT) wrote:
: On Sun, 10 Mar 1996 08:23:59 +0200 (IST) you said:
: >
: >On 8 Mar 1996, Troy D. Van Horn wrote:
: >
: >>       I just discovered the reason for the problem today--I was compiling the
: >> program using C++.  I wrote a small test program and which uses the following
: >> structure from <dos.h>, and it produced different offsets when I compile to
: >> assembly depending on whether I use C or C++.
: >[snip]
: >>      Evendently the C++ compiler does not properly handel the
: >> __attribute__((packed)) command.
: >
: >Yes, that's right.  This is a known GCC bug, so it won't be corrected
: >until some future GCC version.

: ...But you can still correct this behaviour by using #pragma pack(alignment).

Fine, just tell us how to use this #pragma pack(alignment) thing ;)

Ciao,
	Davide.

- Raw text -


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