[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: nonstandard assumptions in the code
Howard Chu writes:
>>> * can cast 'int' to 'void *' and back
>>> (at least back-shell)
>
> K&R C 2nd Edition, p.199 "An object of integral type may be explicitly
> converted to a pointer. The mapping always carries a sufficiently wide
> integer converted from a pointer back to the same pointer..."
The problem is converting the pointer back to int - and getting the
original value. The conversion to pointer might e.g. normalize the
pointer in some way, conflating several different 'int's into the same
pointer value. Which would all be equal when converted back to int.
> Apparently this is a moot point now that you've axed the back-shell
> abandon code.
Yup.
--
Hallvard