<div dir="ltr">Hmmm.. if we'd need to do some form of change to existing code to , I'd be more in favor of mandating the use of {} rather than the semicolon, as opposed to requiring an entire comment just to say that it's intentional that the loop doesn't have a body. It would convey the same information, in a more compact form. And it would have the advantage of bypassing the question of whether semicolons should have spaces in front of them.<div><br></div><div>Paul.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 20, 2018 at 4:30 PM, Adrian Frühwirth <span dir="ltr"><<a href="mailto:scummvm-devel@bonki.net" target="_blank">scummvm-devel@bonki.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everybody,<br>
<br>
Our CFCs currently state that trailing semicolons belonging to empty loops should be preceded by a space when on the<br>
same line _and_ that the loop should be marked intentional with an appropriate comment. This was added to our CFCs after<br>
a short discussion on -devel in 2010 [1].<br>
<br>
A quick grep reveals that there is not a single occurrence with such a comment (at least not where the semicolon is on<br>
the same line) and most also skip the preceding space.<br>
<br>
The reason why this was proposed was that gcc warns about empty loop bodies when using -Wextra or -Wempty-body [2].<br>
However, looking at our configure script, this warning seems to be disabled currently [3].<br>
<br>
If we intend to keep the warning disabled I would like to drop the requirement for either the extra space or the<br>
comment, having both seems a bit redundant. I'm in strong favor of keeping the comment (or rather, add it where<br>
necessary) and drop the space before the semicolon.<br>
<br>
Is anybody against this change?<br>
<br>
-Adrian<br>
<br>
[1] <a href="http://lists.scummvm.org/pipermail/scummvm-devel/2010-April/007554.html" rel="noreferrer" target="_blank">http://lists.scummvm.org/<wbr>pipermail/scummvm-devel/2010-<wbr>April/007554.html</a><br>
[2] <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html" rel="noreferrer" target="_blank">https://gcc.gnu.org/<wbr>onlinedocs/gcc/Warning-<wbr>Options.html</a><br>
[3] <a href="https://github.com/scummvm/scummvm/blob/master/configure#L2033" rel="noreferrer" target="_blank">https://github.com/scummvm/<wbr>scummvm/blob/master/configure#<wbr>L2033</a><br>
<br>
______________________________<wbr>_________________<br>
Scummvm-devel mailing list<br>
<a href="mailto:Scummvm-devel@lists.scummvm.org">Scummvm-devel@lists.scummvm.<wbr>org</a><br>
<a href="http://lists.scummvm.org/listinfo/scummvm-devel" rel="noreferrer" target="_blank">http://lists.scummvm.org/<wbr>listinfo/scummvm-devel</a><br>
</blockquote></div><br></div>