Language features and reinterpret casts
Simen kjaeraas
simen.kjaras at gmail.com
Tue Sep 21 01:23:27 PDT 2010
bearophile <bearophileHUGS at lycos.com> wrote:
> klickverbot:
>> Are there any cases where (*cast(int*)&someFloat) does not fit the bill?
>
> I am not a C lawyer, but I think that too is undefined in C (and maybe D
> too).
From your own link
(http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=109033):
"I don't see any way to make conversions between pointers and ints
implementation defined, and make dereferencing a pointer coming from
some int anything but undefined behavior."
--
Simen
More information about the Digitalmars-d
mailing list