------------------------------------- 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