winedump: Cast-qual warnings fix
David Laight
david at l8s.co.uk
Fri Jul 13 11:05:22 CDT 2007
On Fri, Jul 13, 2007 at 12:29:36PM +0200, Alexandre Julliard wrote:
> Andrew Talbot <Andrew.Talbot at 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
--
David Laight: david at l8s.co.uk
More information about the wine-devel
mailing list