gcc Help Wanted?

Geoff Keating geoffk@cygnus.com
Fri Dec 31 23:54:00 GMT 1999


Chiradeep Chakrabarti <chakraba@Instinet.Com> writes:

> Hello dear admin,
> 
> We are an HP shop and trying to compile some code on a Linux box running
> gcc. We need to align our structures on a 1 byte boundary without any
> padding on the data. There seems to be no options on the
> compiler that we could find with which we could do this. If there is
> a specific pragma syntax that we need to use or any other way that would
> really help us. We would sincerely appreciate any help.

Depending on what you want to do, you want either the flag
'-fpack-struct', or the 'packed' attribute.  You can find about both
of these, and their relative advantages and disadvantages, by reading
the GCC manual which you may be able to access by typing 'info gcc'
(if you have 'info' installed); or, alternatively, it's on the Web
somewhere under < http://gcc.gnu.org/ >.

-- 
- Geoffrey Keating <geoffk@cygnus.com>



More information about the Gcc mailing list