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]
Other format: [Raw text]

Re: C ABI: struct/union inconsistency


> > We _only_ want to change the zero-size-ness of this struct.
> 
> Well, this can handled:
> 
> #ifndef SMP
>         __attribute__(nopadding)__
> #endif
> 
> That is not to say whether re-using nopadding for two (related)
> purposes would be a good idea or not, but we *could* do so.

The bar for introducing an new attribute should be high.

if __attribute__(nopadding) is used to control whether an empty
structure gets "padded" to one byte, then the definition of certain
structures which were intended to be zero size if empty, but PADDED if
not, becomes more complicated.

Why does that not worry me too much?

"We only want to change the zero-sized-ness of this struct" is an
indefensible position, and one for which no justification was ever
offered.

-Tim


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