Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!gatech!hao!husc6!think!ames!necntc!ima!haddock!karl From: karl@haddock.UUCP (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: How big is a (??? *) Message-ID: <564@haddock.UUCP> Date: Mon, 15-Jun-87 17:48:27 EDT Article-I.D.: haddock.564 Posted: Mon Jun 15 17:48:27 1987 Date-Received: Sun, 21-Jun-87 03:18:40 EDT References: <737@edge.UUCP> <790@mcgill-vision.UUCP> <1243@epimass.EPI.COM> <353@formtek.UUCP> <1121@copper.TEK.COM> Reply-To: karl@haddock.ISC.COM.UUCP (Karl Heuer) Organization: Interactive Systems, Boston Lines: 21 In article <1121@copper.TEK.COM> stevesu@copper.TEK.COM (Steve Summit) writes: >> "Nothing is said about pointers to functions, which may be >> incommensurate with object pointers and/or integers." [dpANS:Rat] > >Why not? One problem is efficiency, as you noted. Why should normal programs, which do not mix text/data pointers, have to pay the extra penalty to support esoteric programs that do? Also, on some machines (recall that the standard must address the least common denominator, to some extent) there is nothing useful you can do with a function pointer after casting it to a data pointer. If the most that can be done (in a portable program) is store it and get it back later, you might as well use a union. (Note that on machines in which it *is* safe and efficient, function-casting will probably be implemented as an extension; this is acknowledged in dpANS A.6.5.7 [Oct86]) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint