<s>
A	O
variadic	B-Language
macro	I-Language
is	O
a	O
feature	O
of	O
some	O
computer	O
programming	O
languages	O
,	O
especially	O
the	O
C	B-Language
preprocessor	I-Language
,	O
whereby	O
a	O
macro	O
may	O
be	O
declared	O
to	O
accept	O
a	O
varying	O
number	O
of	O
arguments	O
.	O
</s>
<s>
Variable-argument	O
macros	O
were	O
introduced	O
in	O
1999	O
in	O
the	O
ISO/IEC	B-Language
9899:1999	I-Language
(	O
C99	B-Language
)	O
revision	O
of	O
the	O
C	B-Language
language	I-Language
standard	O
,	O
and	O
in	O
2011	O
in	O
ISO/IEC	O
14882:2011	O
(	O
C++11	B-Language
)	O
revision	O
of	O
the	O
C++	B-Language
language	I-Language
standard	O
.	O
</s>
<s>
Support	O
for	O
variadic	B-Language
macros	I-Language
with	O
no	O
arguments	O
was	O
added	O
in	O
C++20	B-Language
and	O
will	O
be	O
added	O
in	O
C23	B-Language
.	O
</s>
<s>
The	O
declaration	O
syntax	O
is	O
similar	O
to	O
that	O
of	O
variadic	B-Language
functions	I-Language
:	O
a	O
sequence	O
of	O
three	O
full	O
stops	O
""	O
is	O
used	O
to	O
indicate	O
that	O
one	O
or	O
more	O
arguments	O
must	O
be	O
passed	O
.	O
</s>
<s>
No	O
means	O
is	O
provided	O
to	O
access	O
individual	O
arguments	O
in	O
the	O
variable	B-Language
argument	I-Language
list	I-Language
,	O
nor	O
to	O
find	O
out	O
how	O
many	O
were	O
passed	O
.	O
</s>
<s>
Both	O
the	O
C99	B-Language
and	O
C++11	B-Language
standards	O
require	O
at	O
least	O
one	O
argument	O
,	O
but	O
since	O
C++20	B-Language
this	O
limitation	O
has	O
been	O
lifted	O
through	O
the	O
functional	O
macro	O
.	O
</s>
<s>
Common	O
compilers	B-Language
also	O
permit	O
passing	O
zero	O
arguments	O
before	O
this	O
addition	O
,	O
however	O
.	O
</s>
<s>
The	O
C	B-Language
preprocessor	I-Language
rules	O
prevent	O
macro	O
names	O
in	O
the	O
argument	O
of	O
from	O
expanding	O
recursively	O
.	O
</s>
<s>
Several	O
compilers	B-Language
support	O
variable-argument	O
macros	O
when	O
compiling	B-Language
C	B-Language
and	O
C++	B-Language
code	I-Language
:	O
the	O
GNU	B-Application
Compiler	I-Application
Collection	I-Application
3.0	O
,	O
Clang	B-Application
(	O
all	O
versions	O
)	O
,	O
Visual	O
Studio	O
2005	O
,	O
C++Builder	B-Language
2006	O
,	O
and	O
Oracle	B-Application
Solaris	I-Application
Studio	I-Application
(	O
formerly	O
Sun	B-Application
Studio	I-Application
)	O
Forte	O
Developer	O
6	O
update	O
2	O
(	O
C++	B-Language
version	O
5.3	O
)	O
.	O
</s>
<s>
GCC	B-Application
also	O
supports	O
such	O
macros	O
when	O
compiling	B-Language
Objective-C	B-Language
.	O
</s>
<s>
Support	O
for	O
the	O
macro	O
to	O
support	O
zero	O
arguments	O
has	O
been	O
added	O
in	O
GNU	B-Application
Compiler	I-Application
Collection	I-Application
8	O
,	O
Clang	B-Application
6	O
,	O
and	O
Visual	O
Studio	O
2019	O
.	O
</s>
<s>
If	O
a	O
printf-like	O
function	O
were	O
desired	O
,	O
which	O
would	O
take	O
the	O
file	O
and	O
line	O
number	O
from	O
which	O
it	O
was	O
called	O
as	O
arguments	O
,	O
the	O
following	O
solution	O
applies	O
.	O
</s>
<s>
Without	O
variadic	B-Language
macros	I-Language
,	O
writing	O
wrappers	O
to	O
printf	B-Language
is	O
not	O
directly	O
possible	O
.	O
</s>
<s>
The	O
standard	O
workaround	O
is	O
to	O
use	O
the	O
stdargs	B-Language
functionality	O
of	O
C/C	O
++	O
,	O
and	O
have	O
the	O
function	O
call	O
vprintf	O
instead	O
.	O
</s>
<s>
There	O
is	O
a	O
portability	O
issue	O
with	O
generating	O
a	O
trailing	O
comma	O
with	O
empty	O
args	O
for	O
variadic	B-Language
macros	I-Language
in	O
C99	B-Language
.	O
</s>
<s>
Some	O
compilers	B-Language
(	O
e.g.	O
,	O
Visual	O
Studio	O
when	O
not	O
using	O
the	O
new	O
standard-conformant	O
preprocessor	O
)	O
will	O
silently	O
eliminate	O
the	O
trailing	O
comma	O
.	O
</s>
<s>
Other	O
compilers	B-Language
(	O
e.g.	O
</s>
<s>
:	O
GCC	B-Application
)	O
support	O
putting	O
in	O
front	O
of	O
.	O
</s>
<s>
which	O
generates	O
a	O
syntax	O
error	O
with	O
GCC	B-Application
.	O
</s>
<s>
GCC	B-Application
supports	O
the	O
following	O
(	O
non-portable	O
)	O
extension	O
:	O
</s>
<s>
C23	B-Language
solves	O
this	O
problem	O
by	O
introducing	O
__VA_OPT__	O
like	O
C++	B-Language
.	O
</s>
<s>
Before	O
the	O
existence	O
of	O
variable-arguments	O
in	O
C99	B-Language
,	O
it	O
was	O
quite	O
common	O
to	O
use	O
doubly	O
nested	O
parentheses	O
to	O
exploit	O
the	O
variable	O
number	O
of	O
arguments	O
that	O
could	O
be	O
supplied	O
to	O
the	O
function	O
:	O
</s>
