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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [increment1.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/37561
2
// { dg-do compile }
3
// { dg-options "-Wno-int-to-pointer-cast" }
4
 
5
__PTRDIFF_TYPE__ p;
6
char q;
7
 
8
void
9
foo ()
10
{
11
  ((char *) p)++;       // { dg-error "lvalue" }
12
  ((char *) q)++;       // { dg-error "lvalue" }
13
  ((char *) p)--;       // { dg-error "lvalue" }
14
  ((char *) q)--;       // { dg-error "lvalue" }
15
  ++(char *) p;         // { dg-error "lvalue" }
16
  ++(char *) q;         // { dg-error "lvalue" }
17
  --(char *) p;         // { dg-error "lvalue" }
18
  --(char *) q;         // { dg-error "lvalue" }
19
}

powered by: WebSVN 2.1.0

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