FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900208_03.C
blob667a174de22ce2a6359ab8fb43796a369f488917
1 // g++ 1.36.1 bug 900208_03
3 // The Cfront 2.0 reference manual (5.3.3) says "This type must be an
4 // object type; functions cannot be allocated this way...".
6 // g++ fails to detect (at compile time) cases where an attempt is made to
7 // allocate a function using new.
9 // keywords: operator new, function types
11 typedef void (func_type) ();
13 void global_function_0 ()
15   new func_type;        // ERROR - missed by both cfront 2.0 and g++ 1.36.1
18 int main () { return 0; }