🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50629

structure packing in gcc

#50629
From: Stephen A Glow
Date: Fri, 10 Sep 1993 14:54
12 lines
1018 bytes
I'm trying to use a gcc compiled program to read a binary file
which was created by a non-gcc compiled program.  The file
contains an array of structure which happen to each be 18 bytes 
long.  The problem is that gcc seems to be padding it's structures
to 20 bytes, and therefore not reading the array properly.

I know that I could just do a separate read for each structure in
the array, but I'm wondering if there is some was  to tell gcc not
to pad it's structures.

Thanks
Steve
Technical Details
Message-ID: <CD583I.F1p@world.std.com>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!world!sag

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,eddf2ee45caf3802,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-09-10 08:00:23 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!world!sag
From: sag@world.std.com (Stephen A Glow)
Subject: structure packing in gcc
Message-ID: <CD583I.F1p@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
Date: Fri, 10 Sep 1993 14:54:52 GMT
Lines: 12