This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: generalized lvalues -- patch outline
Ziemowit Laski <zlaski@apple.com> writes:
| The semantics are that a C-style cast of an lvalue will itself be
| treated as an lvalue under the following circumstances:
| - The lvalue cast does not induce a type conversion (if it does,
| then we use the type conversion instead);
| - The lvalue cast is being assigned to, incremented or decremented;
| - The lvalue is of a pointer type, and is being cast to a pointer
| type. (This will need to be relaxed somewhat should people desire
| Microsoft compatibility, at least for C.)
This is spelt reinterpret_cast in C++. Please do not overload the
already confusing syntax with yet another confusing, dubious meaning.
I strongly object to the patch and any form to resurect the
cast-as-lvalue abomination.
-- Gaby