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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [warn/] [conv1.C] - Diff between revs 149 and 154

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

Rev 149 Rev 154
// { dg-do compile }
// { dg-do compile }
// Copyright (C) 2003 Free Software Foundation, Inc.
// Copyright (C) 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 20 Apr 2003 
// Contributed by Nathan Sidwell 20 Apr 2003 
// PR 10337, unneeded warning
// PR 10337, unneeded warning
class A {
class A {
  public:
  public:
  A() {}
  A() {}
};
};
class B : public A {
class B : public A {
  public:
  public:
  B() {}
  B() {}
  void operator=(const A& b) {}
  void operator=(const A& b) {}
  void operator=(const B& b) {}
  void operator=(const B& b) {}
};
};
class C {
class C {
  public:
  public:
  C() {}
  C() {}
  operator B &() { return _b; }
  operator B &() { return _b; }
  operator const B &() const { return _b; }
  operator const B &() const { return _b; }
  B _b;
  B _b;
};
};
int main() {
int main() {
  B b;
  B b;
  C c;
  C c;
  b = c;
  b = c;
}
}
 
 

powered by: WebSVN 2.1.0

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