[Bug c++/16102] New: Using references in trinary operator as un lvalue doesn't change the reference in some case
ofiravni99 at walla dot co dot il
gcc-bugzilla@gcc.gnu.org
Sun Jun 20 11:48:00 GMT 2004
gcc version 3.4.0 (Red Hat Linux 3.4.0-1)
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-languages=c,c++,objc,java,f77
--host=i386-redhat-linux
Thread model: posix
The following code should change the value of rx:
int x=5; int y=3;
int& rx=x; int& ry=y;
((rx>ry) ? rx : ry) = 10;
However is doesn't.
The following code DO change the value of rx:
int x=5; int y=3;
int& rx=x; int& ry=y;
((rx>1) ? rx : ry) = 10;
The same happens for ry.
Compilation command didn't include any flags.
--
Summary: Using references in trinary operator as un lvalue
doesn't change the reference in some case
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ofiravni99 at walla dot co dot il
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16102
More information about the Gcc-bugs
mailing list