This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: generalized lvalues -- patch outline
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