From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7b65fc33a05f24b6 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.germany.com!news.motzarella.org!motzarella.org!news.motzarella.org!not-for-mail From: Keith Thompson Newsgroups: comp.lang.ada Subject: Re: A curiosity... Date: Fri, 05 Dec 2008 12:20:47 -0800 Organization: None to speak of Message-ID: References: <84d_k.82$Xt.59@newsfe13.iad> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.motzarella.org U2FsdGVkX18i+VgbgSZq/ii3hVE8L2SK2+Yl7nMbftU5TNs6tgAWSUYcgVu2Duq7Lz7FLylF0CIg1h48XNshyW+b5JPZNb9qp9wooGSH29SVw9GaDR3qTl/Jse4UbX1F X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Fri, 5 Dec 2008 20:20:47 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1/jd6VsFaT+FnddBxqvu4Gm Cancel-Lock: sha1:0y4Jag1jvxOLfisRyQQTs4NvlC4= sha1:+yzYFc4zbfMkcQXQHsiAp3mhzpU= User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (gnu/linux) Xref: g2news1.google.com comp.lang.ada:2896 Date: 2008-12-05T12:20:47-08:00 List-Id: Hyman Rosen writes: > Keith Thompson wrote: >> Except that there's no guarantee in C that converting an int to void* >> and back again will yield the original int value. > > There's a guarantee in your implementation's documentation. Maybe. The result of converting an integer to a pointer type, or vice versa, is implementation-defined, which means the implementation must document it. It's not at all clear what level of detail is required, but you can *probably* determine whether it works the way you want. Which it might not. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"