How to force gcc to blackhole registers so that things maybe garbage collected?
Andrew Haley
aph@redhat.com
Thu May 23 08:10:00 GMT 2019
On 5/22/19 8:54 PM, Alexander Monakov wrote:
>
> On Wed, 22 May 2019, Hamad Ahmed wrote:
>
>> As an example,
>> the C standard disallows casting a pointer to an int,
>> doing operations on the int, and then casting back to a pointer.
>
> Not true; if the int is sufficiently wide so that pointer representation
> is not truncated, if after your operations you got back the same int, you're
> guaranteed that casting back to a pointer results in the original pointer.
Not exactly. You're guaranteed that it will compare equal to the original
pointer, but that's not necessarily the same thing.
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2090.htm
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the Gcc-help
mailing list