[libobjc] May I tweak objc-api.h?
Joern Rennecke
joern.rennecke@superh.com
Mon Feb 9 14:35:00 GMT 2004
> > The change breaks all user code that uses class, but sometimes an easy
> > to describe system is easier to fix than an insanely complex one.
>
> But libobjc is source and binary compatible from 2.95.3 (and maybe
> before) up to 3.5.0.
> Since this is a source level change, I am going to say this should be
> conditional on
> C++/Objc++ as it will only effect new source and not old ones.
>
> > The X11 folks grappled with this, gosh, a long long time ago. Time to
> > enter the 90s. :-)
>
> Well since class is not a reserved word in C at all, we are in the
> 1990s with C99 :-).
>
> Welcome to almost compatible language hell.
Well, we can just take advantage of anonymous unions in GNU99 and put
both class and super_class inside for C. That allows up to support
both old C code that uses class as well as new code which doesn't know
if it's C or C++ or ObjC code and uses super_class.
More information about the Gcc
mailing list