From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 27FA7382C14F; Tue, 2 May 2023 20:13:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 27FA7382C14F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683058439; bh=Lbiw3opIvjbVg0jl3e693yAXRfHUhJL/Oy/ANXwJSU0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=j5GTGAZd+rFpe/viImuZxpDusKh+PY8xDR5NwnFfJ3gif0RQ2LOGEJ4gIWSprC6iK S2uVhHJAUhsUiVu6DeyncsBeJtWEo81MRJ7q9m9ikob6lx/bLxb10W+B+W4N4go0op oyOAw9yCn9maPdyf2b9YuA94zrqn+M7YWa8dDDqQ= 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: Tue, 02 May 2023 20:13:58 +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 #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:4dd44d0c899897da041d2dcc088bed6e11abd80a commit r11-10703-g4dd44d0c899897da041d2dcc088bed6e11abd80a 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)=