A customer recently performed static analysis of my employer\'s C codebase and gave us the results. Among useful patches was the request to change the famous do { ... } whil
Using while(0,0)
prevents Microsoft compiler from generating a warning about a condition which is a constant (Warning C4127).
When this warning is enabled (e.g. with /W4 or /Wall), it can be shut down on a case by case basis with this nice little trick (see this other thread).
EDIT: Since Visual Studio 2017 15.3, while(0)
does not emit warnings anymore (cf. Constant Conditionals). You can get rid of your (0,0)
!