From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16680 invoked by alias); 9 Sep 2002 20:56:01 -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 16665 invoked by uid 71); 9 Sep 2002 20:56:01 -0000 Date: Mon, 09 Sep 2002 13:56:00 -0000 Message-ID: <20020909205601.16664.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Nathan Sidwell Subject: Re: c++/7828: g++ 3.3: bad non-lvalue error (non_cast_lvalue_or_else) Reply-To: Nathan Sidwell X-SW-Source: 2002-09/txt/msg00158.txt.bz2 List-Id: The following reply was made to PR c++/7828; it has been noted by GNATS. From: Nathan Sidwell To: snyder@fnal.gov, gcc-gnats@gcc.gnu.org, pcarlini@unitus.it, gcc-bugs@gcc.gnu.org, Matt Austern , Andrew Pinski Cc: mark@codesourcery.com Subject: Re: c++/7828: g++ 3.3: bad non-lvalue error (non_cast_lvalue_or_else) Date: Mon, 09 Sep 2002 21:54:58 +0100 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7828 Paolo asked me to look at this and 7858. Scott is usually right about c++ Scott's code is well formed, g++ is wrong, Matt's patch probably broke it. long (x) is an rvalue [5.2.3]/2 Foo (const long &) can bind to an rvalue [5.2.2]/4, [8.5]/12, [8.5.3]/5 2nd major point 'Otherwise the reference shall be to a non-volatile const type' ... 'otherwise a temporary of type 'cv1 T1' is created ...' Matt, as it appears that your patch has broken this, even though it might have fixed some bug, could you either fix the latent bug, or revert your patch (like the development plan specifies). It'd be neat to add a scott's code as a g++ testcase too. nathan