🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Tom Vijlbrief Fri, 27 Jan 1989 09:43
G++ 1.32 needs optional & before function argument
#1654
Author: Tom Vijlbrief
Date: Fri, 27 Jan 1989 09:43
45 lines
1747 bytes
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
===============================================================================
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads