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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p3060c.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// A new problem with my pointer to member function work.
3
// prms-id: 3060
4
 
5
class Foo
6
{
7
 public:
8
  int x;
9
  int y;
10
  Foo (int i, int j) { x = i; y = j; }
11
  operator int ();
12
};
13
 
14
int Foo::operator int() { return x; } // { dg-error "return" } can't specify return type
15
 
16
Foo foo(10, 11);
17
 
18
int
19
main()
20
{
21
  int Foo::* pmi = &Foo::y;
22
  return foo.*pmi;
23
}

powered by: WebSVN 2.1.0

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