[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libobjc] May I tweak objc-api.h?

From: Andrew Pinski
Subject: Re: [libobjc] May I tweak objc-api.h?
Date: Fri, 6 Feb 2004 15:24:14 -0800

On Feb 6, 2004, at 15:05, Mike Stump wrote:
There is excellent prior art here, with exactly this issue. The case came up with X11 and C++ and a keyword, probably class, and in some area that did affect api code.

Sorry but this is slightly different from X11 as they have broke backward compatibility with some of their releases before (From X11R5 to X11R6 and such) but GNU's libobjc have been
source and binary compatible for a long time now.

#if (__GNUC_ == 3 && __GNUC_MINOR__ < 4)
#define super_class class

No sorry but this will not work every where because you might have a function called
super_class and then you have binary compatibility issues.

and then use super_class everywhere. It compiles on both, and it easy to maintain, as long as one doesn't get hit with other things called super_class. :-(

See you already see the problem.

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.

Andrew Pinski

reply via email to

[Prev in Thread] Current Thread [Next in Thread]