Friday, 23 August 2013

What does this mean?: *(int32 *) 0 = 0;

What does this mean?: *(int32 *) 0 = 0;

In the following piece of code, what does *(int32 *) 0 = 0; mean?
void
function (void)
{
...
for (;;)
*(int32 *) 0 = 0; /* What does this line do? */
}
A few notes:
The code seems to not be reachable, as there is an exit statement before
that particular piece of code.
int32 is typedef'ed but you shouldn't care too much about it.
This piece of code is from a language's runtime in a compiler, for anyone
interested.

No comments:

Post a Comment