Authors: Joseph Myers
Date: 2026-05-21
Submitted against: C23
Status: Fixed (pending integration in working draft)
Fixed in: C2Y
C23 6.10.5.1 (Macro replacement) says:
Likewise, an identifier currently defined as a function-like macro shall not be redefined by another
#definepreprocessing directive unless the second definition is a function-like macro definition that has the same number and spelling of parameters, and the two replacement lists are identical.
This fails to say explicitly that both definitions must be variadic or both must not be variadic.
#define F(x)
#define F(x, ...)
By contrast, for compatibility of function types, 6.7.7.4 says "the parameter type lists shall agree in the number of parameters and in use of the final ellipsis".
In C23 6.10.5.1 (Macro replacement), insert text as follows.
Likewise, an identifier currently defined as a function-like macro shall not be redefined by another
#definepreprocessing directive unless the second definition is a function-like macro definition that has the same number and spelling of parameters, the two definitions agree in use of the final ellipsis, and the two replacement lists are identical.
Comment from Issues list maintainer on 2026-08-19:
This issue was handled at the August 2026 (Ottawa) meeting of WG14 via processing the N3908 paper rather than through the issue handling process. That paper was adopted into C2y.