On Fri, Jul 13, 2007 at 12:29:36PM +0200, Alexandre Julliard wrote:
Andrew Talbot Andrew.Talbot@talbotville.com writes:
- const char *iter, *base_type, *catch_unsigned;
- union
- {
const char *constant;
char *nonconst;
- } type_str;
That's not better than simply casting const away, it's just hiding the problem from the compiler.
And I'm not sure that the compiler is required to treat the two fields of the union as being the same data item. Certainly if the fields of the union are 'void *' and 'intptr_t' you can't assume that a value written to one field of the union can be immediately read from the other.
David