Proposal for C2x
WG14 N2345 

Title:

The overloading of semi-colons in the C standard specification

Author:

Rajan Bhakta

Date:

2019/03/08

The C standard lists a series of macros and their expansions in the library clause which are often separated by semi-colons (";"). However, since the semi-colon is used in C do denote something different, the tight binding in the text of the standard can be interpreted as meaning it is needed in the expansion of the macro, and the spacing separating the series elements.

Ex. 7.26.1p3:

The macros are

thread_local

which expands to _Thread_local;

ONCE_FLAG_INIT

Should be changed to read something like:

The macros are:

thread_local

which expands to _Thread_local

ONCE_FLAG_INIT

Note that this is just one example and it may occur in other locations in the standard as well.

This will make the standard text straightforward and avoid expansions that would incorrectly (from the intent of the standard) include the semi-colon.