From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id BDB933858D20; Fri, 27 Jan 2023 10:18:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BDB933858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674814703; bh=cv+fOyqg41Z1UK/msWQFxIXEpRypTxL4PWzuWXwzLZQ=; h=From:To:Subject:Date:From; b=xXE7wsoFn9VE/OxbevjD2lvJyekkDz2rHS0bOEpdw2nTWdWY0Wqmq0eSJjoKkfeV9 vMsl2JRddHhADX1FaxQ9SHoh9haFbe8F476Ja8aaz4J3z4SeFdWw15wYXG58VbiXM4 ZsV2ghPAE5z4HiOj9ucpPJ8koaqQE+KJtIXQtbQc= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5437] doc: Fix up return type of __builtin_va_arg_pack_len [PR108560] X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/master X-Git-Oldrev: bd246ac68239d944b01c213c39d6e212362c1b40 X-Git-Newrev: 16f30680f403891556da2ad6329fcef9dc9b47db Message-Id: <20230127101823.BDB933858D20@sourceware.org> Date: Fri, 27 Jan 2023 10:18:23 +0000 (GMT) List-Id: https://gcc.gnu.org/g:16f30680f403891556da2ad6329fcef9dc9b47db commit r13-5437-g16f30680f403891556da2ad6329fcef9dc9b47db Author: Jakub Jelinek Date: Fri Jan 27 11:17:35 2023 +0100 doc: Fix up return type of __builtin_va_arg_pack_len [PR108560] __builtin_va_arg_pack_len as implemented returned int since its introduction in 2007. The initial documentation didn't mention any return type, which changed in 2010 in r0-103077-gab940b73bfabe2cec4 during some documentation formatting cleanups https://gcc.gnu.org/legacy-ml/gcc-patches/2010-09/msg01632.html I can understand that for formatting some type was needed there but what exactly hasn't been really discussed. So, I think we should change documentation to match the implementation, rather than change implementation to match the documentation. Most people don't use more than 2147483647 arguments to inline functions, and on poor targets with 16-bit ints I bet even having more than 65535 arguments to inline functions would be highly unexpected. 2023-01-27 Jakub Jelinek PR other/108560 * doc/extend.texi: Fix up return type of __builtin_va_arg_pack_len from size_t to int. Diff: --- gcc/doc/extend.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 4a89a3eae7c..027a08a2f62 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -688,7 +688,7 @@ myprintf (FILE *f, const char *format, ...) @end smallexample @end deftypefn -@deftypefn {Built-in Function} {size_t} __builtin_va_arg_pack_len () +@deftypefn {Built-in Function} {int} __builtin_va_arg_pack_len () This built-in function returns the number of anonymous arguments of an inline function. It can be used only in inline functions that are always inlined, never compiled as a separate function, such