Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.law/parsing9.C

raw
1 // { dg-do assemble }
2 // GROUPS passed parsing
3 // From: Jason Merrill <[email protected]>
4 // Date: Fri, 13 Aug 93 12:49:11 PDT
5 // Subject: 2.4.5 won't compile array of pointers to functions returning T
6 // Message-ID: <[email protected]>
7 // From: "Robert M. Keller" <[email protected]>
8 // Subject: g++ bug
9 // Date: Fri, 13 Aug 93 10:09:27 PDT
10
11 /* Testing declaration of "array of pointers to functions returning T" */
12
13 typedef int T;
14
15 T foo()
16 { return 10; }
17
18 T bar()
19 { return 20; }
20
21 T baz()
22 { return 30; }
23
24 int main()
25 {
26 T (*apfrt[10])();
27
28 apfrt[0] = foo;
29 apfrt[1] = bar;
30 apfrt[2] = baz;
31
32 }