[Bug c++/18474] New: Unary plus/minus lvalueness not diagnosed in templates

giovannibajo at libero dot it gcc-bugzilla@gcc.gnu.org
Sun Nov 14 10:51:00 GMT 2004


-------------------------------------
template <int>
void g(void)
{
  -n = 0;        // { dg-error "non-lvalue" "" { xfail *-*-* } }
  +n = 0;        // { dg-error "non-lvalue" "" { xfail *-*-* } }
}
-------------------------------------

This should be rejected but does not (until instantiation).

-- 
           Summary: Unary plus/minus lvalueness not diagnosed in templates
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: giovannibajo at libero dot it
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18474



More information about the Gcc-bugs mailing list