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++.old-deja/] [g++.brendan/] [overload3.C] - Blame information for rev 305

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

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// GROUPS passed overloading
3
typedef int rutBoolean;
4
 
5
class rutBigIntRep
6
{
7
public:
8
  friend rutBoolean operator>(const rutBigIntRep& a, const rutBigIntRep& b);
9
  operator rutBoolean() const;
10
protected:
11
  enum Kluge {kluge};
12
  rutBigIntRep(Kluge) {}
13
  rutBigIntRep();
14
  rutBigIntRep(const rutBigIntRep& value);
15
  rutBigIntRep& operator=(const rutBigIntRep& value);
16
};
17
 
18
rutBoolean operator>(const rutBigIntRep& a, const rutBigIntRep& b) {
19
  // This should not result in a warning.  It used to warn about the
20
  // conversion from int to enum while exploring the possibility of
21
  // converting `a' via `operator rutBoolean', then using the
22
  // rutBigIntRep(Kluge) constructor.  It later realizes it shouldn't
23
  // do this, but the call to build_type_conversion was ending up with
24
  // a warning in convert.
25
  rutBigIntRep diff(a);
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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