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] - Rev 774

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

// Copyright (C) 2007 Free Software Foundation
// Contributed by Ollie Wild <aaw@google.com>
// { dg-do compile }

// Test implicit conversion of pointers to member functions appearing as
// operands of the equality operators.

struct B { };

struct BV { };

struct D : B, virtual BV { };

struct C { };

void f ()
{
  void (D::*pd) () = 0;
  void (B::*pb) () = 0;
  void (BV::*pbv) () = 0;
  void (C::*pc) () = 0;

  pd == pb;
  pd == pbv;  // { dg-error "" }
  pd == pc;   // { dg-error "comparison between distinct pointer-to-member types" }
}

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

powered by: WebSVN 2.1.0

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