From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: Padding Question Date: Sat, 07 Dec 1996 14:22:40 -0800 Organization: Alcyone Systems Lines: 21 Message-ID: <32A9EE30.7A212C19@alcyone.com> References: <32A810D9 DOT 366E9B4E AT m-net DOT arbornet DOT org> <32A85B15 DOT 4015 AT skygames DOT com> <32A8F16C DOT 596F AT cs DOT com> <32A91EFF DOT 6C6FD6F0 AT alcyone DOT com> <32A9CD2C DOT 6BAE AT cs DOT com> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp John M. Aldrich wrote: > There is, as far as I know, no such easy way to test whether #pragma > pack will work on any given compiler. I have read many statements by > experienced programmers, all of whom say that #pragma is a very bad > thing to rely upon in a portable program. But that was my whole point. If you're counting on packed structures, you have to do something compiler-specific to get them -- in DJGPP, that's either with a #pragma or an attribute. Considering that they are _both_ inherently nonportable, and in both cases you know the conditions which they will be usable, I don't see why the one is any better than the other. Ultimately it comes down to the fact that both alternatives are nonportable. -- Erik Max Francis | max AT alcyone DOT com Alcyone Systems | http://www.alcyone.com/max/ San Jose, California | 37 20 07 N 121 53 38 W &tSftDotIotE | R^4: the 4th R is respect "But since when can wounded eyes see | If we weren't who we were"