blob: 5356796094a2606da99ea52082b8154bd535c64a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Build don't link:
// Special g++ Options: -pedantic-errors -g -Wall
// GROUPS passed synthetics
// excess errors test - XFAIL sparc64-*-elf
// Check to make sure that g++ doesn't get freaked out about the use
// of generated methods that it supposedly "can't see".
class Char {
public:
Char();
Char(char v);
// synthetic copy-constructor and operator=
private:
char value;
};
class XChar: public Char {
public:
XChar();
XChar(char v, int serial);
void operator=(const XChar& other);
private:
int serial;
};
void
XChar::operator=(const XChar& other)
{
Char::operator=(other);
// serial stays the same
}
|