FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900208_04.C
blobbcf03973f104b54d9866f68e296d61146eb02ff0
1 // g++ 1.36.1 bug 900208_04
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 // deallocate a function using delete.
9 // Cfront 2.0 passes this test.
11 // keywords: operator delete, function types
13 typedef void (func_type) ();
15 void global_function_1 (func_type *p)
17   delete p;             // ERROR - caught by Cfront 2.0 but not by g++ 1.36.1
20 int main () { return 0; }