From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bbbeae4ed07e9626 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Address to function pointer conversion Date: 1997/06/14 Message-ID: #1/1 X-Deja-AN: 248381501 References: <5nrq5h$13cm@info4.rus.uni-stuttgart.de> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-06-14T00:00:00+00:00 List-Id: Michael says <> Well, it is the only possible answer! It is clear that the language provides no such capability, because the very *idea* of converting an address to an access-to-function type is highly implementation dependent. What makes you think that an access-to-function value is anything like an address? It often is not. For example, in gcc it is often the address of a trampoline on a local stack. In the DEC ABI, an access to function value is a pointer to a procedure descriptor. Unchecked conversion may work on one particular implementation, and you feel nervous using it, because you are afraid that it might be implementation dependent. GOOD! You should feel nervous, whatever you feel you need this for should be reconsidered carefully, since you are venturing into the areas of highly non-portable code.