This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Alignment option question


I think I'm having a similar problem.  I'd like to use a struct
as an overlay for some data read in from a file.  I took a look
at the documentation (the section on "Storage Layout" at
http://egcs.cygnus.com/onlinedocs/gcc_17.html#SEC201 ), and it
seems like the option that I need to pack the fields correctly
is in there somewhere, but either I haven't been able to find
the right flag or combination of flags yet, or I'm not using
the options properly.

If anyone can give me a push/shove/kick in the right direction,
I'd really appreciate it.  Thanks.

Brian D.


> Yes, please read the manual (*.texi) that we spent considerable time
> writting for you.  Look for the word pack.  Also, if you rearrange the

> elements, so the longs are first, it will just work.

> > Date: Mon, 30 Aug 1999 21:10:03 -0700
> > To: gcc@gcc.gnu.org
> > From: Bill Sheets <bills@ziadesigns.com>

> > I am having a problem with gcc forcing alignment of short
> > and long ints in a structure with version 2.8.1 on Solaris
> > on a Sparc system.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]