Use a less retarded language.
On Sat, May 01, 2010 at 11:39:00AM +0200, Christopher Zimmermann wrote:
> Hi,
>
> the following piece of code compiles fine using g++ 4.2.4, but
> fails using g++ 3.3.5 in the base system:
>
> error: operands to ?: have different types
>
> It is part of ptlib, which is the base library for opal, which in
> turn is needed for ekiga, which I'm trying to port.
>
> What is your suggestion? Can anyone think of a workaround for
> this or should I just compile it using eg++ 4.2.4 ?
>
>
> Christopher
>
>
> #include<err.h>
>
> #define WarnIfNULL(x) ((x) ? (x) : (warn("blub"),(x)))
>
> class A
> {
> protected:
> int a;
> };
>
> class B : A
> {
> public:
> void blub()
> {
> WarnIfNULL(A::a);
> }
> };