csq031@umaxc.weeg.uiowa.edu (01/31/91)
//
// zortech has no problem
// turbo c++ has no problem
// why does gcc get so mad at me?
//
typedef void (*function_pointer)(void);
class x {
void funky_function1(function_pointer f); // works OK
void funky_function(void (*function_parameter)(void)); // should work
};
Compiler output:
gcc version 1.37.1
d:/djgcc/bin/cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dunix -Di386 -D__unix__ -D__i386__ tst.cc C:\TMP\/ccAA_AAA.cpp
GNU CPP version 1.37.1
d:/djgcc/bin/cc1plus C:\TMP\/ccAA_AAA.cpp -quiet -dumpbase tst.cc -version -o C:\TMP\/ccAA_AAA.s
GNU C++ version 1.37.1 (based on GCC 1.37) (80386, BSD syntax) compiled by GNU C version 1.37.1.
default target switches: -m80387
tst.cc:10: `function_parameter' undeclared, outside of functions
tst.cc:10: parse error before `)'
--
Kent Williams --- williams@umaxc.weeg.uiowa.edu
"'Is this heaven?' --- 'No, this is Iowa'" - from the movie "Field of Dreams"
"This isn't heaven, ... this is Cleveland" - Harry Allard, in "The Stupids Die"