This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to stop gcc padding structs???

On 29-Jan-2001, Grant Edwards <> wrote:
> On Mon, Jan 29, 2001 at 10:26:40AM +0000, Richard Earnshaw wrote:
> > 
> > Relying on sizeof to do this is *very* non-portable.
> It's a device driver for a specific board.  It doesn't really
> need to be portable.

The fact that it is a device driver for a specific board means that
you're not going to try to port it to a different board.  But
well-written device drivers do get ported to different operating
systems, or compiled with different compilers.  For example, one
reason why you might want to port to a different compiler is that you
might discover that the compiler you're using is buggy.  Note that
even upgrading to a later version of the same compiler may expose you
to some of the same portability issues.

Perhaps you are aware of these issues, and have made a reasonable
engineering decision that the benefits of relying on this nonportable
feature is worth the difficulty it may cause if the code is ported.
But many people are not aware that portability means more than just
porting to different hardware.

Fergus Henderson <>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <>  |     -- the last words of T. S. Garp.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]