Kaffe runs(!) under VC++

Alexandre Oliva 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.

-- 
Alexandre Oliva
mailto:oliva at dcc.unicamp.br mailto:aoliva at acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



More information about the kaffe mailing list