use of memset and optimization

Ben Cox cox at
Fri Nov 8 12:11:40 EST 2002

On Fri, 2002-11-08 at 10:56, John Hascall wrote:
>    1) volatile requirement (as you mention)
>    2) the signal handler has no way to access that object anyway
>       (it's only pointed to by "key" which is local to the function)

If it is declared volatile, how could the compiler know that memset
won't save away a pointer to the block, and use that saved pointer in
the signal handler that could be called after it returns?

-- Ben

More information about the krbdev mailing list