Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!pa.dec.com!jrdzzz.jrd.dec.com!tkou02.enet.dec.com!jit533!diamond From: diamond@jit533.swstokyo.dec.com (Norman Diamond) Newsgroups: comp.std.c Subject: Re: Casting Function Pointers Message-ID: <1991May24.005626.7783@tkou02.enet.dec.com> Date: 24 May 91 00:56:26 GMT References: <1145@mwtech.UUCP> <1991May24.005025.7714@tkou02.enet.dec.com> Sender: usenet@tkou02.enet.dec.com (USENET News System) Reply-To: diamond@jit533.enet@tkou02.enet.dec.com (Norman Diamond) Organization: Digital Equipment Corporation Japan , Tokyo Lines: 19 To clarify my article <1991May24.005025.7714@tkou02.enet.dec.com>: >In article <1145@mwtech.UUCP> martin@mwtech.UUCP (Martin Weitzel) writes: >>Third and most important: Will the guarantees ANSI C gives with >>respect to the (identical) representation of certain pointer types >>extend to the calling sequence of a function? > >No. A function with two parameters might have a different calling sequence >from a function with zero parameters. A function with an int parameter might >have a different calling sequence from a function with a struct parameter. The identical representation of void* and char* includes their appearance in calling sequences of functions. If that is what you meant, then the answer is yes. But two pointers to arbitrary function types, while they must have identical representations, do not have identical calling sequences. Sorry about overlooking your probably intended meaning. -- Norman Diamond diamond@tkov50.enet.dec.com If this were the company's opinion, I wouldn't be allowed to post it. Permission is granted to feel this signature, but not to look at it.