This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/1920: g++ -O1 optimization bug in casting a reference argument
- From: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 31 Oct 2002 02:06:00 -0000
- Subject: Re: c++/1920: g++ -O1 optimization bug in casting a reference argument
- Reply-to: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
The following reply was made to PR c++/1920; it has been noted by GNATS.
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: c++/1920: g++ -O1 optimization bug in casting a reference argument
Date: Wed, 30 Oct 2002 20:03:32 -0600 (CST)
The code in question invokes a gcc extension, casts as lvalues. The
manual says about this:
> Standard C++ allows compound expressions and conditional expressions
> as lvalues, and permits casts to reference type, so use of this
> extension is deprecated for C++ code.
Still, if the compiler accepts the syntax, then it should get it right.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth