This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [libobjc] May I tweak objc-api.h?
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: pinskia at physics dot uc dot edu (Andrew Pinski)
- Cc: discuss-gnustep at gnu dot org, objc-language at lists dot apple dot com, gcc at gcc dot gnu dot org (GCC List), alexander at malmberg dot org (Alexander Malmberg), pinskia at physics dot uc dot edu (Andrew Pinski), mrs at apple dot com (Mike Stump)
- Date: Mon, 9 Feb 2004 14:34:39 +0000 (GMT)
- Subject: 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.