libstdc++: Remove note from the GCC 4.0.1 days
[official-gcc.git] / gcc / testsuite / g++.dg / expr / unary2.C
blob4db68375944dcd19bb9036d5f51c419a2fecc03a
1 // PR c++/18474
2 // { dg-do compile }
3 // Unary plus/minus are not lvalues.
5 int n;
7 void f(void)
9   -n = 0;        // { dg-error "3:lvalue" }
10   +n = 0;        // { dg-error "3:lvalue" }
13 template <int>
14 void g(void)
16   -n = 0;        // { dg-error "lvalue" "" }
17   +n = 0;        // { dg-error "lvalue" "" }