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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// Contributed by Dodji Seketeli 
2
// Origin PR c++/37093
3
 
4
template 
5
static
6
void foo(void *obj)             // { dg-message "note" }
7
{
8
  C *p = static_cast(obj);
9
  (p->*M)();
10
}
11
 
12
template 
13
static void
14
bar(C *c, void (C::*m) ())
15
{
16
  foo((void *)c);// { dg-error "(not a valid template arg|pointer-to-member|no matching fun|could not convert)" }
17
  // { dg-message "candidate" "candidate note" { target *-*-* } 16 }
18
}
19
 
20
struct S
21
{
22
  void baz () {}
23
};
24
 
25
int
26
main ()
27
{
28
  S a;
29
  bar(&a, &S::baz);
30
}

powered by: WebSVN 2.1.0

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