🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #53000

gcc & rs6000 packed data structures

#53000
From: schuman
Date: Wed, 01 Apr 1992 04:28
21 lines
1071 bytes
After installing GCC2.0 on an RS-6000, I have been having some problems with
packed data structures.  Here is the problem:

Sample Program--
main ()
{
	typedef struct {
	     char a[13];
	     int  b;
	} c;

	printf("The size = %d", sizeof(c));
}

The output of the program is 20.  I want to compile the program so it will pack
the data structure and print out 17.  If anyone knows how to make to gcc 
compiler not allign its structures on 4 byte boundaries, it would be extremely
helpful.

Creg Schumann -- schumann@mhd1.moorhead.msus.edu
Technical Details
Message-ID: <1992Mar31.222837.332@msus1.msus.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!lll-winken!iggy.GW.Vitalink.COM!widener!umn.edu!msus1.msus.edu!schuman

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,cd98d9a5e5ba716f,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-03-31 20:28:37 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!lll-winken!iggy.GW.Vitalink.COM!widener!umn.edu!msus1.msus.edu!schuman
From: schuman@msus1.msus.edu
Newsgroups: gnu.gcc.help
Subject: gcc & rs6000 packed data structures
Message-ID: <1992Mar31.222837.332@msus1.msus.edu>
Date: 1 Apr 92 04:28:37 GMT
Organization: Minnesota State University System
Lines: 21