🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #54296

struct packing.

#54296
From: Tom May
Date: Thu, 29 Nov 1990 04:52
16 lines
1416 bytes
Has anyone patched gcc to make it do structure packing, i.e., letting
structure members fall where they may rather than aligning them and leaving
holes in the struct?

I have done some simple patches already to add a __packed__ keyword (as in
__packed__ struct x { short a; long b; }, etc.) which seems to work ok,
but I fear my patches may not be robust enough, especially handling bit-fields
and conversion of fields from BLKmode to SImode, etc., so if anybody has done
something really good, can you let me know?  Thanks.

Just for the record, I have to pass structures to a 34010 based graphics
board, and gcc leaves holes in my structures, which the 34010 doesn't
appreciate at all.
--
Tom May
tom@yang.cpac.washington.edu
Technical Details
Message-ID: <TOM.90Nov28205200@dharma.cpac.washington.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!mercury.cair.du.edu!pikes!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!milton.acs.washington.edu!tom

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,7e8cdc226bc622cb,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1990-11-28 20:52:00 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!mercury.cair.du.edu!pikes!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!milton.acs.washington.edu!tom
From: tom@dharma.cpac.washington.edu (Tom May)
Newsgroups: gnu.gcc.help
Subject: struct packing.
Message-ID: <TOM.90Nov28205200@dharma.cpac.washington.edu>
Date: 29 Nov 90 04:52:00 GMT
Sender: news@milton.u.washington.edu
Distribution: gnu
Organization: /u2/guest/tom/.organization
Lines: 16
Posted: Thu Nov 29 05:52:00 1990