From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C0DD9382A2F7; Wed, 3 May 2023 15:20:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C0DD9382A2F7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683127253; bh=XQthah4i7KE1yNMvI/qP67cfoDUdTZwB5OCRNrKsOkw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QJ4p4uVVjH+8a5ptA6ZnE4NckA91djE3H3nfOfbRdFxuFrWap+SScPcEmSWLM89dk rrTvNDcD5fyWRH3iHspWbVb6at/fTMIsEk0U9mZKZcxMUVn+ib4qEppP1hvDncRCPP YW5A1ecgC4CLRmV/vTcOoJR7aHjpvXos2zYA++Sw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/108560] builtin_va_arg_pack_len is documented to return size_t, but actually returns int Date: Wed, 03 May 2023 15:20:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108560 --- Comment #7 from CVS Commits --- The releases/gcc-10 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:5ebdbf03c7fb77c2535faca020e25a16658e8cb6 commit r10-11358-g5ebdbf03c7fb77c2535faca020e25a16658e8cb6 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 function= s, 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. (cherry picked from commit 16f30680f403891556da2ad6329fcef9dc9b47db)=