Topic: class C; struct S {}; typedef S C; // Legal?


Author: tbl@wagner (Tom Lyons)
Date: 19 Dec 1994 20:29:06 GMT
Raw View
Is the following legal?

    class C;
    typedef struct S { int s; } *P;
    typedef S C;

It seems useful, and the ARM does not appear to forbid it.
Compilers disagree about it.

Thanks,
Tom Lyons
tbl@maelstrom.timeplex.com