This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51317] New: Wrong value category of conditional expression where lvalue operands differ only in cv-qualification (see DR 587)
- From: "tsoae at mail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 26 Nov 2011 18:27:33 +0000
- Subject: [Bug c++/51317] New: Wrong value category of conditional expression where lvalue operands differ only in cv-qualification (see DR 587)
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51317
Bug #: 51317
Summary: Wrong value category of conditional expression where
lvalue operands differ only in cv-qualification (see
DR 587)
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: tsoae@mail.ru
GCC 4.7.0 rejects the following application of address-of operator:
int x = 1;
int const y = 2;
int const *p = &(1 ? x : y); // error: lvalue required as unary '&' operand
Such behavior was correct in C++03, but it is incorrect in C++11 - see
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#587