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: unassig...@gcc.gnu.org
        ReportedBy: ts...@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

Reply via email to