Raghukrishna Hegde wrote:
Hello all,
    I am encountering a strange problem. I have a code
Snippet that contains a while loop.

The snippet is as follows:

     While( (expr1) && (expr2) );

    Initially the value of both expr1 and expr2 are
Set to 1.

Next, only the value of expr1 is set to 0 within a SIGINT handler.

you need to make expr1 volatile for this to work, the
optimizer does not have to take care of the possibility
of a handler changing a variable otherwise.

Reply via email to