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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [warn/] [conv1.C] - Blame information for rev 307

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

Line No. Rev Author Line
1 301 jeremybenn
// { dg-do compile }
2
 
3
// Copyright (C) 2003 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 20 Apr 2003 
5
 
6
// PR 10337, unneeded warning
7
 
8
class A {
9
  public:
10
  A() {}
11
};
12
 
13
class B : public A {
14
  public:
15
  B() {}
16
  void operator=(const A& b) {}
17
  void operator=(const B& b) {}
18
};
19
 
20
class C {
21
  public:
22
  C() {}
23
  operator B &() { return _b; }
24
  operator const B &() const { return _b; }
25
 
26
  B _b;
27
};
28
 
29
int main() {
30
  B b;
31
  C c;
32
  b = c;
33
}

powered by: WebSVN 2.1.0

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