tom@tnosoes.UUCP (Tom Vijlbrief) (01/27/89)
The G++ 1.32 (SunOs 3.5, Sun 3/60)
complains about this program:
===========================
#define NULL 0
typedef void (*exceptionTrapTy)(unsigned&, int& ...);
class ExceptionTrap {
exceptionTrapTy old_trap;
public:
ExceptionTrap(exceptionTrapTy xtrap =NULL);
~ExceptionTrap();
};
void xtrap(unsigned& err, int& sev)
{
err= 0;
sev= 0;
}
main()
{
ExceptionTrap x(xtrap); // Error ?!, fix by using:
// ExceptionTrap x(&xtrap);
}
========================
tom@sunflare:~/src/CC/bug> g++ -v -S errbug.c
g++ version 1.32.0
/usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix -D__HAVE_68881__ -Dmc68020 errbug.c /tmp/cca10049.cpp
GNU CPP version 1.32
/usr/local/lib/gcc-c++ /tmp/cca10049.cpp -quiet -dumpbase errbug.c -version -o errbug.s
GNU C++ version 1.32.0 (68k, MIT syntax) compiled by GNU C version 1.32.
In function int main ():
errbug.c:21: bad argument to constructor `ExceptionTrap'
===========================
===============================================================================
Tom Vijlbrief
TNO Institute for Perception
P.O. Box 23 Phone: +31 34 63 62 77
3769 ZG Soesterberg E-mail: tnosoes!tom@mcvax.cwi.nl
The Netherlands or: uunet!mcvax!tnosoes!tom
===============================================================================