[cfe-dev] Flexible array members in ObjC classes
Nat! via cfe-dev
cfe-dev at lists.llvm.org
Thu Sep 21 02:07:03 PDT 2017
My initial reaction was, a flexible array as an ivar is dumb. Flexible
array ivars must appear at the end of the struct (AFAIK). Then you can't
subclass such a class anymore.
My second reaction, was to think that there are class cluster classes
with allocate a flexible amount of memory (say string classes) that
aren't ususally subclassed. Who am I to say, that using a convenient
flexible array there can't be done (anymore) ?
I would think a warning would be nice for classes who try to subclass a
class with a flexible array ivar if they add another property or ivar.
Ciao
Nat!
More information about the cfe-dev
mailing list