Volatile MEMs in statement expressions and functions inlined as trees
Gabriel Dos Reis
gdr@codesourcery.com
Fri Dec 14 11:31:00 GMT 2001
Linus Torvalds <torvalds@transmeta.com> writes:
[...]
| Now, that return value is not really an lvalue, but it's actually
[...]
| COULD it be a real lvalue? Yes.
The C++ definition is pretty clear about a return value of class-type:
it is an rvalue.
| I think that special case is actually a
| syntactic one, not a fundamental issue. Not making that addressable
| variable a lvalue means that the compiler on a syntactic level actually
| disallows you from taking the address of the temporary object.
If it is of class-type, then you can have its address by calling a
member function. You can even assign to it if a non-const type -- not
that not all lvalues are assignable.
-- Gaby
More information about the Gcc-patches
mailing list