LINUX.ORG.RU

История изменений

Исправление beastie, (текущая версия) :

Это классика жанра. Читать например тут → https://hownot2code.com/2016/12/05/do-while-0-in-macros/

TL;DR:

do{…}while(0) is the only construct in C that lets you define macros that always work the same way, so that a semicolon after your macro always has the same effect, regardless of how the macro is used (with particularly emphasis on the issue of nesting the macro in an if without curly-brackets).

Исходная версия beastie, :

Это классика жанра. Читать например тут → https://hownot2code.com/2016/12/05/do-while-0-in-macros/