Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesfiles Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!cmcl2!acf4!greenber From: greenber@acf4.UUCP Newsgroups: net.lang.c Subject: Re: Ptr to func doesn't like casting?? Message-ID: <13900011@acf4.UUCP> Date: Fri, 30-Nov-84 09:29:00 EST Article-I.D.: acf4.13900011 Posted: Fri Nov 30 09:29:00 1984 Date-Received: Sun, 2-Dec-84 04:07:21 EST References: <13900010@acf4.UUCP> Organization: New York University Lines: 27 Nf-ID: #R:acf4:13900010:acf4:13900011:000:988 Nf-From: acf4!greenber Nov 30 09:29:00 1984 <> Okay....I've received about three million, two hunderd and six responses regarding this casting question. Thank you one and all. Everybody told me basically the same thing: (int (*)()) is the way to cast. Then they cast(igated) me for using a non-portable cast. Some indicated that the primary problem of this cast was that the ptr to function is supposed to point to instruction space and might barf if it points to data space on a machine that cares (I&D --- where have I heard that before?). A few indicated that I should really use unions. That's a nogo, since I use the structure that this is a part of as an initializer. But I've tried this casting on every machine that I can get my hands on and it seems to work (either that or that cast turns on the "shut-up" flag automagically in lint! :-) ) . I would be interested in finding out what machines it WILL NOT work on. Thanks again, guys!! Ross M. Greenberg @ NYU ----> allegra!cmcl2!acf4!greenber <----