This is the mail archive of the gcc@gcc.gnu.org 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]

Minimum struct size



I've recently noticed that gcc doesnt allow structs of zero size (it forces
every struct to be at least one byte big). This is currently causing us all
sorts of problems as we often use base classes with no members and worry about
the size of classes (we do embedded systems stuff). What I'm writing to ask is:
does anyone remember why this is the case, and whether it's fixable without
breaking fundamental assumptions? if so I might have a go about fixing it
myself... (NB the standard says 'base class sub objects *may* have zero size')

Thanks,

Rob Taylor
Flying Pig Systems


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