2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900407_01.C
blobe5976d6941c611ecc9117eb418b2913a08a3157d
1 // { dg-do assemble  }
2 // g++ 1.37.1 bug 900407_01
4 // g++ fails to flag errors for uses of anachronistic features such as the
5 // invocation of a base class constructor in a ctor-initializer list without
6 // explicitly giving its name.
8 // Errors should probably be issued for such usage unless the -traditional
9 // option is used.
11 // Warnings are however issued.
13 // Cfront 2.0 flags such usage as an error when the +p (pure-language) option
14 // is used.
16 // Cfront 2.0 passes this test.
18 // keywords: anachronism, inheritance, initialization, mem-initializer
20 struct s0 {
21   int member;
23   s0 ();
26 s0::s0() { }
28 struct s1 : public s0 {
29   int member;
31   s1 ();
34 s1::s1() : () {         // { dg-error "" } anachronism used
37 int main () { return 0; }