FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.brendan / synth1.C
blob5356796094a2606da99ea52082b8154bd535c64a
1 // Build don't link: 
2 // Special g++ Options: -pedantic-errors -g -Wall
3 // GROUPS passed synthetics
4 // excess errors test - XFAIL sparc64-*-elf
5 // Check to make sure that g++ doesn't get freaked out about the use
6 // of generated methods that it supposedly "can't see".
8 class Char {
9 public:
10     Char();
11     Char(char v);
12     
13     // synthetic copy-constructor and operator=
14 private:
15     char value;
18 class XChar: public Char {
19 public:
20     XChar();
21     XChar(char v, int serial);
22     
23     void operator=(const XChar& other);
24 private:
25     int serial;
28 void
29 XChar::operator=(const XChar& other)
31     Char::operator=(other);
32     // serial stays the same