[comp.std.c] compatability isn't transitive

walter@hpclwjm.HP.COM (Walter Murray) (02/01/90)

Brendan McKay writes:

>         Find three types A, B, C, such that A and B are compatible,
>         B and C are compatible, but A and C are not compatible.

> [Additionally, all three types are required to be complete.]

typedef void (*A) (int);
typedef void (*B) ();
typedef void (*C) (double);

Walter Murray
----------

bdm659@csc.anu.oz (02/02/90)

In article <12570042@hpclwjm.HP.COM>, walter@hpclwjm.HP.COM (Walter Murray) writes:
> Brendan McKay writes:
>
>>         Find three types A, B, C, such that A and B are compatible,
>>         B and C are compatible, but A and C are not compatible.
>
>> [Additionally, all three types are required to be complete.]
>
> typedef void (*A) (int);
> typedef void (*B) ();
> typedef void (*C) (double);

Ok, that's a solution too.  There's another one for complete types other
than functions.  If it hasn't been posted when I get back in a week, I'll
post it myself.

Brendan McKay.

PS.  I never said this wasn't a boring question.