2 // g++ 1.36.1 bug 900208_03
4 // The Cfront 2.0 reference manual (5.3.3) says "This type must be an
5 // object type; functions cannot be allocated this way...".
7 // g++ fails to detect (at compile time) cases where an attempt is made to
8 // allocate a function using new.
10 // keywords: operator new, function types
12 typedef void (func_type) ();
14 void global_function_0 ()
16 new func_type; // { dg-error "" } missed by both cfront 2.0 and g++ 1.36.1
19 int main () { return 0; }