Post #1864457
2026-05-01 15:23 UTC
Apparently you have to rewrite your stdarg.h code for C23, though a macro is provided for easing the task.
It doesn’t matter for me, because I am writing directly for C23. The new version of the headers is convenient for me, although I could have written a version used exactly the same way for <=C17 (and so could write compatible conditional code, if I cared to).
The prototype is ‘string_t concat_string_t (...)’ for C23 but ‘string_t concat_string_t (string_t, ...)’ for C17.
#programming
Replies (1)
-
@chemoelectric@masto.ai 2026-05-01 15:26
It is for concatenating any number of UTF-32 strings, using a NULL pointer as the sentinel argument. Because a NULL pointer is a valid value for a string_t, the C17 prototype works. With the way stdarg.h works, for NULL to be a valid string_t is necessary for C23 as well, I think.