Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Varargs problem Message-ID: <10863@smoke.BRL.MIL> Date: 28 Aug 89 20:46:29 GMT References: <4YxPuc200VsnE_B3Jy@andrew.cmu.edu> <1301@levels.sait.edu.au> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 15 In article <1301@levels.sait.edu.au> MARWK@levels.sait.edu.au writes: >I am not an expert, but it seems to me that one can always cast a pointer >to a pointer of another type, ... No, in fact conversion between object and function pointers is officially disallowed. (It surprised me when I first heard about it, but after pondering the point for a while I decided that was proper.) Conversion among object (data) pointers is constrained by the natural alignment requirements only. On a true segmented architecture, for example, it might take more bits to represent a function address than for any data address within a task, because function pointers would have to include segment identification while with proper C compiler implementation all the process's data would be in a single known segment.