delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/07/03/09:00:08

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: data alignment issue
Date: 3 Jul 2003 12:48:50 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 28
Message-ID: <be18ni$1rh$1@nets3.rz.RWTH-Aachen.DE>
References: <00A224F4 DOT 86EC817C DOT 6 AT st DOT fmph DOT uniba DOT sk>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1057236530 1905 137.226.32.75 (3 Jul 2003 12:48:50 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 3 Jul 2003 12:48:50 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Viktor DOT Stujber AT st DOT fmph DOT uniba DOT sk wrote:

> Can someone tell me a:
> 1) compiler switch
> 2) keyword
> 3) method
> with which I could correct the error?

No.  Because there is no error in DJGPP's behaviour, in the first
place, thus nothing to be corrected.  The assumptions hard-coded into
the program snippets you showed are where the real error is.  These
assumption simply don't hold, and code making such assumptions is
broken.

While there are indeed methods to make some structs' layouts fit your
expectations, using them is a) unportable, and b) will usually fail on
at least some platforms such code will have to run on, anyway.

For more background on this, please consult the C FAQ, posted
regularly to the comp.lang.c and comp.lang.c.moderated newsgroups,
among other places. 

> reply to 2stujber AT st DOT fmph DOT uniba DOT sk, thanks!

No. You write here --> you read here.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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