varargs question

Tom Stockfisch tps at chem.ucsd.edu
Sat Jul 16 12:30:17 AEST 1988


In article <161 at neti1.uucp> bdr at neti1.uucp (Brian Renaud) writes:
X...  I am using a non-ansi <varargs.h> type compiler.
X	...
X	char	*(*func)();	/* local variable to hold pointer */
X	...
X	func = va_arg(ap, char *(*)());
XUnfortunately, va_arg turns the cast into something like:
X	(char *(*)() *) ...
Xinstead of the desired:
X	(char *(**)() ) ...
X...workaround?

try
	typedef char	*(*PFPC)();

	...

	func =	va_arg( ap, PFPC );


-- 

|| Tom Stockfisch, UCSD Chemistry	tps at chem.ucsd.edu



More information about the Comp.lang.c mailing list