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++.jason/] [overload9.C] - Blame information for rev 779

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

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// PRMS Id: 4257
3
// Bug: g++ ignores non-member possibilities (ideal_candidate_ansi bug)
4
 
5
class ostream
6
{
7
public:
8
#ifdef EITHER_ONE_A
9
    ostream& operator<<(unsigned long n);
10
    ostream& operator<<(long n);
11
#else
12
    ostream& operator<<(short n);
13
    ostream& operator<<(unsigned short n);
14
#endif
15
};
16
 
17
class ccObjectInfo {};
18
 
19
ostream& operator << (ostream& out, const ccObjectInfo& obj);
20
 
21
class ccString : public ccObjectInfo
22
{
23
#ifdef EITHER_ONE_B
24
    operator int                () const;
25
#else
26
    operator long               () const;
27
#endif
28
};
29
 
30
// Should pick this one!!
31
ostream& operator << (ostream& o, const ccString & s);
32
 
33
extern ostream cout;
34
 
35
void f ()
36
{
37
    ccString foo;
38
    cout << foo;
39
}

powered by: WebSVN 2.1.0

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