FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900407_01.C
blob988642f4ad3557cea89c44a75c5fb0f6d1d9ac37
1 // g++ 1.37.1 bug 900407_01
3 // g++ fails to flag errors for uses of anachronistic features such as the
4 // invocation of a base class constructor in a ctor-initializer list without
5 // explicitly giving its name.
7 // Errors should probably be issued for such usage unless the -traditional
8 // option is used.
10 // Warnings are however issued.
12 // Cfront 2.0 flags such usage as an error when the +p (pure-language) option
13 // is used.
15 // Cfront 2.0 passes this test.
17 // keywords: anachronism, inheritance, initialization, mem-initializer
19 struct s0 {
20   int member;
22   s0 ();
25 s0::s0() { }
27 struct s1 : public s0 {
28   int member;
30   s1 ();
33 s1::s1() : () {         // ERROR - anachronism used
36 int main () { return 0; }