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++.dg/] [conversion/] [ptrmem9.C] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// Copyright (C) 2007 Free Software Foundation
// Copyright (C) 2007 Free Software Foundation
// Contributed by Ollie Wild 
// Contributed by Ollie Wild 
// { dg-do compile }
// { dg-do compile }
// Test implicit conversion of pointers to member functions appearing as
// Test implicit conversion of pointers to member functions appearing as
// operands of the equality operators.
// operands of the equality operators.
struct B { };
struct B { };
struct BV { };
struct BV { };
struct D : B, virtual BV { };
struct D : B, virtual BV { };
struct C { };
struct C { };
void f ()
void f ()
{
{
  void (D::*pd) () = 0;
  void (D::*pd) () = 0;
  void (B::*pb) () = 0;
  void (B::*pb) () = 0;
  void (BV::*pbv) () = 0;
  void (BV::*pbv) () = 0;
  void (C::*pc) () = 0;
  void (C::*pc) () = 0;
  pd == pb;
  pd == pb;
  pd == pbv;  // { dg-error "" }
  pd == pbv;  // { dg-error "" }
  pd == pc;   // { dg-error "comparison between distinct pointer-to-member types" }
  pd == pc;   // { dg-error "comparison between distinct pointer-to-member types" }
}
}
 
 

powered by: WebSVN 2.1.0

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