B
Brian Inglis
OK, I'll buy 'formally speaking' ...
Perhaps even touching nonexistent?
Depends on what register your bitpattern resides in. Given the option
between float and int, my guess is one of the SSE registers?
The answer depends on what instruction you are to issue next, no?
The latencies though, between SSE and adress registers prohibits practical
use of SSE to calculate offsets.
(and yes, I am aware of the wonderful weirdness of Intel pointer
bitpatterns, but even in asm they are hard to actually get at)
OK ...
I wouldn't ...
You are now saying that:
free(p)
if(p)
...
... *could* result in a cast to float whith a possible raise of an
exception (NaN or whatever)
That means free() would deliberately have to set the register where it
found p to an evil pattern. And if p was on the stack (or some such),
nobody would even ever notice?
This is longwinded.
Formally ...
OK, on the Deathstation perhaps. I think you have now touched the
unimplemented part of the world, no?
;-)
I would buy this if we have had a construct like:
p = free(p);
... but this is not the case.
Ehrmm, p is still declared as a pointer and not a float. I assume my
compiler to still evaluate it as a pointer. How then can the meaning of
the (unchanged) bitpattern have changed (in an implementation other than
the imaginary evil Deathstation?)
The Deathstation could change the tag bits defining the type from
pointer to float in it's type TLB. AFAIK there's nothing in the spec
to prohibit free() from being implemented as an intrinsic which sets p
to NULL or BAD bitpattern.