From cbdc93e95f0b598fc862096d3789d4007d04fdb6 Mon Sep 17 00:00:00 2001 From: ripley Date: Sun, 15 Sep 2024 15:30:43 +0000 Subject: [PATCH] add point on variadic macros git-svn-id: https://svn.r-project.org/R/trunk@87152 00db46b3-68df-0310-9c12-caf00c1e9a41 --- doc/manual/R-exts.texi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/manual/R-exts.texi b/doc/manual/R-exts.texi index 7a4699e600..4a3c39a3fc 100644 --- a/doc/manual/R-exts.texi +++ b/doc/manual/R-exts.texi @@ -6373,7 +6373,7 @@ something like error("Actual: %0.f; Expected %0.f\n", (double) XLENGTH(Robj), (double) nelem); @end example @noindent -@c x86_64 as a 52-bit design limit. +@c x86_64 has a 52-bit design limit. @c Linux and Windows are said to have 48-bit virtual address limits. (This could print to full precision, lengths well beyond the address space limits of current OSes, let alone practical limits.) @@ -6389,6 +6389,12 @@ as @code{int64_t}. So the values will need to be cast to the type assumed by the format (and @code{%lld} was not supported on Windows until @R{}@tie{}4.2.0). +@item +Variadic macros in C or C++ only portably allow a non-zero number of +arguments, although some compilers have allowed zero, often with a +warning. The latter was standardized in C++20 using the @code{__VA_OPT__} +maacro. C23 will also allow zero arguments in a similar way. + @end itemize Some additional information for C++ is available at