Xref: news-dnh.mv.net comp.os.msdos.djgpp:1208 Path: news-dnh.mv.net!mv!news.sprintlink.net!tank.news.pipex.net!pipex!news.mathworks.com!newsfeed.internetmci.com!news.uoregon.edu!news.u.washington.edu!ghogenso From: ghogenso AT u DOT washington DOT edu (Gordon Hogenson) Newsgroups: comp.os.msdos.djgpp Subject: Re: GCC/DJGPP Weirdness (structure padding stuff) Date: 28 Jul 1995 05:15:05 GMT Organization: University of Washington Lines: 17 References: Nntp-Posting-Host: saul2.u.washington.edu Nntp-Posting-User: ghogenso To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp >>2) Tell GCC not to pad the data. >> To do this you need to use the "attribute" option for the declaration. >This is correct, except PACKED should be lowercase... >char x __attribute__ ((packed)); BTW, there is a new option in gcc 2.7.0: -fpack-struct (or something similar) which causes all structs to be packed, with no messing about with attributes! Gordon. -- --------------------------------------------------------------- Gordon J. Hogenson work: (505) 667-9471 ghogenso AT u DOT washington DOT edu home: (505) 661-6753 ---------------------------------------------------------------