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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [conversion/] [ptrmem9.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
// Copyright (C) 2007 Free Software Foundation
2
// Contributed by Ollie Wild 
3
// { dg-do compile }
4
 
5
// Test implicit conversion of pointers to member functions appearing as
6
// operands of the equality operators.
7
 
8
struct B { };
9
 
10
struct BV { };
11
 
12
struct D : B, virtual BV { };
13
 
14
struct C { };
15
 
16
void f ()
17
{
18
  void (D::*pd) () = 0;
19
  void (B::*pb) () = 0;
20
  void (BV::*pbv) () = 0;
21
  void (C::*pc) () = 0;
22
 
23
  pd == pb;
24
  pd == pbv;  // { dg-error "" }
25
  pd == pc;   // { dg-error "comparison between distinct pointer-to-member types" }
26
}

powered by: WebSVN 2.1.0

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