Declaring objects of type `function' ??

Henry Spencer henry at utzoo.uucp
Thu Feb 22 05:34:10 AEST 1990


In article <25E18E05.16004 at paris.ics.uci.edu> rfg at paris.ics.uci.edu (Ronald Guilmette) writes:
>Is this legal?
>	typedef int (function) ();
>	function global_function_object;	/* dubious */
>	int global_function_object ()
>	{

Check out 3.7.1 and the footnote thereto.  You can't inherit the
function-ness from a typedef in a function *definition*, but it's
legal in a declaration.
-- 
"The N in NFS stands for Not, |     Henry Spencer at U of Toronto Zoology
or Need, or perhaps Nightmare"| uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.std.c mailing list