Minimum struct size
Rob Taylor
robt@flyingpig.com
Thu Jul 27 10:38:00 GMT 2000
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
More information about the Gcc
mailing list