Path: utzoo!attcan!uunet!husc6!rutgers!ucsd!chem.ucsd.edu!tps From: tps@chem.ucsd.edu (Tom Stockfisch) Newsgroups: comp.std.c Subject: Re: function returning pointer to itself Message-ID: <259@chem.ucsd.EDU> Date: 18 Jul 88 20:59:58 GMT References: <7725@watdragon.waterloo.edu) <664@goofy.megatest.UUCP) <7797@watdragon.waterloo.edu) Reply-To: tps@chem.ucsd.edu (Tom Stockfisch) Organization: Chemistry Dept, UC San Diego Lines: 22 In article <7797@watdragon.waterloo.edu) Scott writes: )In article <664@goofy.megatest.UUCP) djones@megatest.UUCP (Dave Jones) writes: ))From article <7725@watdragon.waterloo.edu), by smking@lion.waterloo.edu (Scott M. King): (me) ))) In article <5485@batcomputer.tn.cornell.edu) olson@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@chem.ucsd.edu