generalized lvalues -- patch outline

Gabriel Dos Reis gdr@integrable-solutions.net
Tue Nov 23 00:09:00 GMT 2004


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



More information about the Gcc mailing list