This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Compiling GCC With a C++ Compiler (g++)
On Wed, 13 Oct 2004, Gabriel Dos Reis wrote:
> | Yes. The lvalue here is '(*p).fu', which has type 'int' and therefore
> | is a modifiable lvalue.
>
> No. The lvalue *p, of type S, is not modifiable.
But the requirement for a modifiable lvalue is the constraint in 6.5.16#1,
"An assignment operator shall have a modifiable lvalue as its left
operand.". The left operand if (*p).fu. (*p).fu is a modifiable lvalue.
A modifiable lvalue may well have operands which are not modifiable
lvalues; this is irrelevant as long as the operand of the assignment
operator is a modifiable lvalue, which it is.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)