OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900407_01.C] - Blame information for rev 841

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

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do assemble  }
2
// g++ 1.37.1 bug 900407_01
3
 
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.
7
 
8
// Errors should probably be issued for such usage unless the -traditional
9
// option is used.
10
 
11
// Warnings are however issued.
12
 
13
// Cfront 2.0 flags such usage as an error when the +p (pure-language) option
14
// is used.
15
 
16
// Cfront 2.0 passes this test.
17
 
18
// keywords: anachronism, inheritance, initialization, mem-initializer
19
 
20
struct s0 {
21
  int member;
22
 
23
  s0 ();
24
};
25
 
26
s0::s0() { }
27
 
28
struct s1 : public s0 {
29
  int member;
30
 
31
  s1 ();
32
};
33
 
34
s1::s1() : () {         // { dg-error "" } anachronism used
35
}
36
 
37
int main () { return 0; }

powered by: WebSVN 2.1.0

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