OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [expr/] [unary2.C] - Blame information for rev 844

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do compile }
2
// Unary plus/minus are not lvalues.
3
 
4
// In templates we require an instantiation to emit the diagnostic. This
5
//  is wrong and it is PR 18474.
6
 
7
int n;
8
 
9
void f(void)
10
{
11
  -n = 0;        // { dg-error "lvalue" }
12
  +n = 0;        // { dg-error "lvalue" }
13
}
14
 
15
template 
16
void g(void)
17
{
18
  -n = 0;        // { dg-error "lvalue" "" { xfail *-*-* } }
19
  +n = 0;        // { dg-error "lvalue" "" { xfail *-*-* } }
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.