generalized lvalues -- patch outline
Nathan Sidwell
nathan@codesourcery.com
Tue Nov 23 18:30:00 GMT 2004
Thomas Kunert wrote:
> A union is the correct solution.
>
> union {
> char* c;
> int* i;
> short* s;
> } p;
>
> *p.i++;
This suggests an excellent model for describing this extension. The lvalue
cast behaves as if the object is a union of two fields. One field with
the original type and the other field with the cast-to type.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
More information about the Gcc
mailing list