delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/09/15:32:38

From: Endlisnis <s257m AT unb DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: packed Bit-Fields
Date: Thu, 9 Jul 1998 15:09:53 -0300
Organization: University of New Brunswick
Lines: 14
Message-ID: <Pine.SOL.3.96.980709150613.24539D-100000@sol.sun.csd.unb.ca>
NNTP-Posting-Host: sol-alt1.unb.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

	If I have something like:
struct {
 int z;
 char m;
 int a:3, b:7, c:10, d:10, e:2;
 };

	Where should I put "__attribute__((packed))" to make sure there is
no 'slack-space' in that struct (especially between 'm' & 'a')?  Do I have
to put it after each variable? {a,b,c,d & e}

	Endlisnis
[I have a pyramid of wingyness]

- Raw text -


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