This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |