C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Remove infinite loop UB
From: Jason McKesson (jmckesson_at_[hidden])
Date: 2020-05-10 11:02:22


Corrections to some code. I got my conditions backwards:

> //Spin to wait for VBlank routine
> waiting_for_vblank = 1;
> while(!waiting_for_vblank) {}

The condition should be `while(waiting_for_vblank) {}`.

Also:

> //Busy loop 2:
> waiting_for_vblank = 0;
> while(waiting_for_vblank) {}

The condition should be `while(!waiting_for_vblank) {}`.


STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups