www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/07/29/16:14:42

Xref: news-dnh.mv.net comp.os.msdos.djgpp:1231
Path: news-dnh.mv.net!mv!news.sprintlink.net!tank.news.pipex.net!pipex!dish.news.pipex.net!pipex!sunic!sunic.sunet.se!news.uni-c.dk!diku.dk!terra
From: terra AT diku DOT dk (Morten Welinder)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GCC/DJGPP Weirdness (structure padding stuff)
Date: 29 Jul 1995 14:13:01 GMT
Organization: Department of Computer Science, U of Copenhagen
Lines: 22
Sender: terra AT tyr DOT diku DOT dk
References: <DCFFCA DOT Ev3 AT jade DOT mv DOT net>
Nntp-Posting-Host: odin.diku.dk
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

"A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk> writes:

>  ghogenso AT u DOT washington DOT edu (Gordon Hogenson) wrote:-
>> BTW, there is a new option in gcc 2.7.0: -fpack-struct (or something
>> similar) which causes all structs to be packed, with no messing about with
>> attributes!

>Why not pack structs etc anyway by default?

Doing that just gives you problems elsewhere.



> On a PC, (rounding every member's
>width to a multiple of 2 or 4 bytes) achieves nothing except wasting store and
>annoying people who want to make a struct match some assembly-coded table (as
>e.g. when calling some interrupts).

Sorry, but that is plain and simple incorrect.  You can destroy 50%
of your computer power by misaligning in a bad case.

Morten

- Raw text -


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