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: [libobjc] May I tweak objc-api.h?


> > 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.


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