delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-workers-bounces using -f |
Message-ID: | <409621C8.805@phekda.gotadsl.co.uk> |
Date: | Mon, 03 May 2004 11:41:12 +0100 |
From: | Richard Dawe <rich AT phekda DOT gotadsl DOT co DOT uk> |
User-Agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031031 |
X-Accept-Language: | en, de, fr |
MIME-Version: | 1.0 |
To: | djgpp-workers AT delorie DOT com |
Subject: | Re: pragma pack in dir.h |
References: | <8011-Sat01May2004205607+0300-eliz AT gnu DOT org> <409508C6 DOT 1000002 AT phekda DOT gotadsl DOT co DOT uk> <9178-Sun02May2004203015+0300-eliz AT gnu DOT org> |
In-Reply-To: | <9178-Sun02May2004203015+0300-eliz@gnu.org> |
Reply-To: | djgpp-workers AT delorie DOT com |
Hello. Eli Zaretskii wrote: >>Date: Sun, 02 May 2004 15:42:14 +0100 >>From: Richard Dawe <rich AT phekda DOT gotadsl DOT co DOT uk> >> >>><dir.h> has this: >>> >>> /* This is for g++ 2.7.2 and below */ >>> #pragma pack(1) >>> >>> struct ffblk { >>> char lfn_magic[6] __attribute__((packed)); /* LFN */ >>> short lfn_handle __attribute__((packed)); /* LFN */ >>> unsigned short lfn_ctime __attribute__((packed)); /* LFN */ >>> unsigned short lfn_cdate __attribute__((packed)); /* LFN */ >>> unsigned short lfn_atime __attribute__((packed)); /* LFN */ >> >>[...] >>How about switching from a pragma to using __attribute__((packed))? > > > Look above we use both "#pragma pack" _and_ __attribute__((packed)). Sorry, you're quite right. > The reason for the pragma is that g++ 2.7.2 and earlier had a bug in > the C++ compiler whereby __attribute__((packed)) was not honored in > C++ programs. > > My suggestion boils down to using "#pragma pack" only for those old > compilers. 2.7.2 is very old. How about dropping support for it? 2.95.x are pretty stable. Bye, Rich =] -- Richard Dawe [ http://homepages.nildram.co.uk/~phekda/richdawe/ ] "You can't evaluate a man by logic alone." -- McCoy, "I, Mudd", Star Trek
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |