From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32637 invoked by alias); 13 Oct 2004 22:02:50 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 32406 invoked from network); 13 Oct 2004 22:02:45 -0000 Received: from unknown (HELO lon-mail-1.gradwell.net) (193.111.201.125) by sourceware.org with SMTP; 13 Oct 2004 22:02:45 -0000 X-Gradwell-Debug: delivering mail for [gcc@gcc.gnu.org] to gcc.gnu.org [12.107.209.250]:25 Received: from digraph.polyomino.org.uk [81.187.227.50] (user: postmaster6815c918op3.polyomino.org.uk) by lon-mail-1.gradwell.net with esmtp (Gradwell gwh-smtpd 1.138) id 416da5f1.6fd.12e; Wed, 13 Oct 2004 23:02:25 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.42) id 1CHrCT-0006J3-Fv; Wed, 13 Oct 2004 22:02:25 +0000 Date: Wed, 13 Oct 2004 22:53:00 -0000 From: "Joseph S. Myers" X-X-Sender: jsm28@digraph.polyomino.org.uk To: Gabriel Dos Reis cc: Geoffrey Keating , GCC , Ranjit Mathew , Zack Weinberg Subject: Re: Compiling GCC With a C++ Compiler (g++) In-Reply-To: Message-ID: References: <416B89F2.1030606@gmail.com> <87brf735or.fsf@codesourcery.com> <0B22A446-1D60-11D9-A665-0030657EA24A@apple.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-10/txt/msg00540.txt.bz2 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)