1 // g++ 1.37.1 bug 900520_04
2 
3 // g++ does not yet support the initialization of scalar type objects
4 // (including built-in arithmetic types, enum types, and pointer types)
5 // via constructor initialization syntax except within a call to operator
6 // new.
7 
8 // keywords: unimplemented, syntax, initialization, scalar types
9 
10 enum e_type { e_value };
11 
12 typedef char *charp;
13 
14 charp cp;
15 
16 int global_i (1);				// gets bogus error
17 double global_d (9.9);				// gets bogus error
18 charp global_cp0 (cp);				// gets bogus error
19 charp global_cp1 (0);				// gets bogus error
20 enum e_type global_e (e_value);			// gets bogus error
21 
func0()22 void func0 ()
23 {
24   int local_i (1);				// gets bogus error
25   double local_d (9.9);				// gets bogus error
26   charp local_cp0 (cp);				// gets bogus error
27   charp local_cp1 (0);				// gets bogus error
28   enum e_type local_e (e_value);		// gets bogus error
29 }
30 
func1()31 void func1 ()
32 {
33   int* ip = new int (1);			// gets bogus error
34   double* dp = new double (9.9);		// gets bogus error
35   charp* cpp0 = new charp (cp);			// gets bogus error
36   charp* cpp1 = new charp (0);			// gets bogus error
37   enum e_type* ep = new e_type (e_value);	// gets bogus error
38 }
39 
main()40 int main () { return 0; }
41