delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/01/01:41:17

Newsgroups: comp.os.msdos.djgpp
From: manni DOT heumann AT gmx DOT de (Manni Heumann)
Subject: Re: HELP : structures & DJGPP
References: <113cad2a DOT dc3587b4 AT usw-ex0104-087 DOT remarq DOT com>
X-Newsreader: News Xpress 2.01
Date: Fri, 31 Mar 2000 21:47:56 GMT
NNTP-Posting-Host: ppp36-63.hrz.uni-bielefeld.de
Message-ID: <38e50efe_1@news.uni-bielefeld.de>
X-Trace: 31 Mar 2000 22:47:58 +0200, ppp36-63.hrz.uni-bielefeld.de
Lines: 23
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

batchex <thedark1NOthSPAM AT phreaker DOT net DOT invalid> wrote:
>Hi,
>
>I notice DJGPP/GCC generates by default, 4 bytes aligned
>structures. Currently, I need at least 2 of my structures are
>packed (no holes). I read the manual about a compiler option to
>do this, but it will generate ALL structures as packed. I only
>need 2 (or several more) structures packed, and others are
>aligned. How can I do this? Are there any preprocessors that can
>be used to tell the compiler if I want a specific structure to
>be packed and else to be aligned?
>
>BTW, anybody knows where I can find a documentation of all C/C++
>preprocessors?

Use "__attribute__((packed))" see section 22.10 of the FAQ.
See cpp.info for the preprocessor docs.


--

Manni

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019