[PATCH v2 2/2] Remove trailing semicolon after RB_GENERATE_STATIC

David Newall openssh at davidnewall.com
Fri Jun 4 18:08:19 AEST 2021


On Thu, 13 May 2021, Michael Forney wrote:
> This expands to a series of function definitions, so the semicolon is
> not necessary (in fact, it is not allowed in ISO C).

I went looking for that, and failed to find it.  The best I could find 
says otherwise.  ISO/IEC 9899:2017 (C17): Section 6.8.3 Expression and 
null statements specifically allows a null statement (as you'd expect 
given the section name).

It must be a new revision.  When did the null statement become 
disallowed?  Reference, please.

If the null statements are still allowed, I urge that the patch be 
reverted as it would then be mere noise in the change history, a 
distraction at best, and a source of errors at worst.

The benefit of the semi-colon (if allowed) is that it makes explicit 
that the macro is a psuedo-statement.  Also, if the macro is redefined 
to produce an expression that is not a (terminated) statement, the 
program will no longer compile.

In case you hadn't noticed, I look unfavourably on trivial, janitorial 
patches.



More information about the openssh-unix-dev mailing list