Kaffe runs(!) under VC++
oliva at dcc.unicamp.br
Mon Nov 3 10:15:11 PST 1997
John D Gwinner writes:
> My only thought, is that you've got to be carefull about assuming the
> layout of the union; I don't think, for example, that passing a pointer to
> stack_item is the same as passing a pointer to i (the first union item).
AFAIK, the ANSI C Standard requires that a pointer to a union must
have the same alignment requirements that pointers to all the elements
of the union have, and a pointer to a union can be safely casted to a
pointer to any of its elements. Unless M$ is trying to break ANSI C
too :-), I'd expect VC++ to comply with this rule.
mailto:oliva at dcc.unicamp.br mailto:aoliva at acm.org
Universidade Estadual de Campinas, SP, Brasil
More information about the kaffe