Date: Thu, 3 Feb 2022 21:48:52 +0100
On 03/02/2022 13.36, Aaron Ballman via Liaison wrote:
> I would like to add a paper to next week's agenda at the request of
> WG14 (who are meeting this week for a plenary meeting).
>
> WG14 N2919 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2919.pdf)
> Relax requirements for variadic parameter lists
> This paper proposes allowing a function signature consisting solely of
> an ellipsis in C (e.g., void foo(...);) and changes the va_start macro
> so that its second argument is optional and never evaluated (only the
> first parameter is used). The author is looking for feedback on
> whether this proposal will cause compatibility concerns, as WG14 is
> intending to add this feature to C23.
The syntax "void foo(...)" is already supported in C++,
so this part seems not an issue.
It would be good to have an overview in the paper which (major)
compilers already use some __builtin_va_start and which ones still
look at parmN. If (the C modes of) all major C++ compilers already
do the former without inspecting parmN, there doesn't seem to be an
issue.
(C++ would need to adjust [cstdarg.syn] for the modified
va_start definition.)
Jens
> I would like to add a paper to next week's agenda at the request of
> WG14 (who are meeting this week for a plenary meeting).
>
> WG14 N2919 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2919.pdf)
> Relax requirements for variadic parameter lists
> This paper proposes allowing a function signature consisting solely of
> an ellipsis in C (e.g., void foo(...);) and changes the va_start macro
> so that its second argument is optional and never evaluated (only the
> first parameter is used). The author is looking for feedback on
> whether this proposal will cause compatibility concerns, as WG14 is
> intending to add this feature to C23.
The syntax "void foo(...)" is already supported in C++,
so this part seems not an issue.
It would be good to have an overview in the paper which (major)
compilers already use some __builtin_va_start and which ones still
look at parmN. If (the C modes of) all major C++ compilers already
do the former without inspecting parmN, there doesn't seem to be an
issue.
(C++ would need to adjust [cstdarg.syn] for the modified
va_start definition.)
Jens
Received on 2022-02-03 20:48:55