Patchwork manual: Update @standards for [__]va_copy.

login
register
mail settings
Submitter Rical Jasan
Date June 17, 2017, 8:42 a.m.
Message ID <20170617084202.4662-1-ricaljasan@pacific.net>
Download mbox | patch
Permalink /patch/21061/
State Superseded
Headers show

Comments

Rical Jasan - June 17, 2017, 8:42 a.m.
There is question as to whether __va_copy should be documented in the
glibc manual at all.  Since users searching for *va_copy are likely to
find this manual, and GCC doesn't document either, it is important we
continue to provide some kind of reference.

stdarg(3) documents va_copy as being introduced in C99.

	* lang.texi (va_copy): Change standard from ISO to C99.
	(__va_copy): Add standard and header annotation.
---
 manual/lang.texi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Zack Weinberg - June 17, 2017, 1:59 p.m.
On 06/17/2017 04:42 AM, Rical Jasan wrote:
> There is question as to whether __va_copy should be documented in the
> glibc manual at all.  Since users searching for *va_copy are likely to
> find this manual, and GCC doesn't document either, it is important we
> continue to provide some kind of reference.

Let's leave alone the question of whether we should document a GCC
extension for now.

This patch is OK with some additional wording adjustments: in the second
paragraph of the @deftypefn block, change "This macro" to
"@code{va_copy}", "@samp{gcc -ansi}" to "@samp{gcc -std=c90}", and "The
macro @code{__va_copy} is available as a GNU extension;" to "GCC
provides @code{__va_copy}, as an extension, in any standards mode."
Delete the clause beginning "before GCC 3.0", as I believe compilers
that old will no longer work with glibc's headers anyway.

zw
Andreas Schwab - June 17, 2017, 6:32 p.m.
On Jun 17 2017, Zack Weinberg <zackw@panix.com> wrote:

> Delete the clause beginning "before GCC 3.0", as I believe compilers
> that old will no longer work with glibc's headers anyway.

We still support ancient GCC versions.

Andreas.

Patch

diff --git a/manual/lang.texi b/manual/lang.texi
index c4b641d4e1..cf0e4e73cd 100644
--- a/manual/lang.texi
+++ b/manual/lang.texi
@@ -471,7 +471,8 @@  of the same type.
 
 @deftypefn {Macro} void va_copy (va_list @var{dest}, va_list @var{src})
 @deftypefnx {Macro} void __va_copy (va_list @var{dest}, va_list @var{src})
-@standardsx{va_copy, ISO, stdarg.h}
+@standardsx{va_copy, C99, stdarg.h}
+@standardsx{__va_copy, GNU, stdarg.h}
 @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
 @c This is no longer provided by glibc, but rather by the compiler.
 The @code{va_copy} macro allows copying of objects of type