Varargs problem
Doug Gwyn
gwyn at smoke.BRL.MIL
Tue Aug 29 06:46:29 AEST 1989
In article <1301 at levels.sait.edu.au> MARWK at 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.
More information about the Comp.lang.c
mailing list