function returning pointer to itself

Tom Stockfisch tps at chem.ucsd.edu
Tue Jul 19 06:59:58 AEST 1988


In article <7797 at watdragon.waterloo.edu) Scott writes:
)In article <664 at goofy.megatest.UUCP) djones at megatest.UUCP (Dave Jones) writes:
))From article <7725 at watdragon.waterloo.edu), by smking at lion.waterloo.edu (Scott M. King): (me)
))) In article <5485 at batcomputer.tn.cornell.edu) olson at tcgould.tn.cornell.edu (olson) writes:
))))Does the new C standard have a natural way to declare a
))))function that returns a pointer to itself

)Or, the function could similarly be declared as
)
)	void *
)main();
)
)since you can quite easily convert any pointer to a void * and back without
)loss of information.
)Scott M. King

Wrong.  (void *) is guaranteed to hold any _data_ pointer.  I believe you
were correct the first time, as I think (void *(*)()) is guaranteed to
hold any function pointer.  (Anyone care to correct me?)
-- 

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



More information about the Comp.std.c mailing list