From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31294 invoked by alias); 8 Oct 2002 23:56:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 31276 invoked by uid 71); 8 Oct 2002 23:56:02 -0000 Date: Tue, 08 Oct 2002 16:56:00 -0000 Message-ID: <20021008235602.31272.qmail@sources.redhat.com> To: austern@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: =?iso-8859-1?Q?Pop_S=E9bastian?= Subject: Re: c++/7828: g++ 3.3: bad non-lvalue error (non_cast_lvalue_or_else) Reply-To: =?iso-8859-1?Q?Pop_S=E9bastian?= X-SW-Source: 2002-10/txt/msg00322.txt.bz2 List-Id: The following reply was made to PR c++/7828; it has been noted by GNATS. From: =?iso-8859-1?Q?Pop_S=E9bastian?= To: Gabriel Dos Reis Cc: austern@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/7828: g++ 3.3: bad non-lvalue error (non_cast_lvalue_or_else) Date: Wed, 9 Oct 2002 01:51:54 +0200 On Wed, Oct 09, 2002 at 01:39:28AM +0200, Gabriel Dos Reis wrote: > Pop Sébastian writes: > > | I cannot reproduce the error with > | gcc version 3.2.1 20020924 (Debian prerelease) > | > | nor with the last cvs: > | version gcc 3.3 20021007 (experimental) > > Indeed, it was fixed by Matt -- I can't recall off hand when, > certainly somewhere in September. > > -- Gaby Maybe the following? from gcc/ChangeLog 2002-09-13 Matt Austern * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p. * cp/call.c: Change call-by-const-reference mechanism to use non_cast_lvalue_p when deciding whether the create a temporary. We need a temporary when passing, e.g. (long) x by const ref. * testsuite/g++.dg/other/constref[12].C: New, regression tests for passing a cast expression to a function by const reference. I think this entry should go into cp/ChangeLog ... Gaby could you fix that?