Message ID | Y9OUvmVFcSU5Eaix@tucnak |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp731363wrn; Fri, 27 Jan 2023 01:10:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXuUg2DJ12/MMkM9ygwFEEsOcR+GqJ/FWmO4KQW2cCFco3vlu37VwF3eTmInKhpqzWQ5rfdS X-Received: by 2002:a05:6402:28c6:b0:498:f2d:f52e with SMTP id ef6-20020a05640228c600b004980f2df52emr41860424edb.21.1674810611165; Fri, 27 Jan 2023 01:10:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674810611; cv=none; d=google.com; s=arc-20160816; b=ynA5lsy/et4v9SSSljXZrcRDDCG382Q2OOR9+KOtvDOHSDo0wJx24uBm7S4oHTwKoU 0h4voc7ufGCM0sqoygS1OVMbmOV1bc03/DI6NoTqAqivyaEHk1Kmdx9AO+o4o6naFutk zqFJJ42G9FVRH4NphwkGmIlup//rc1jQkRG5v5ki0MLvRo4lAFsqc2i+JnTYxpcIKhpG Mx9mwuCz2KPBKrGivMBumCdsH19j2tGhKd3aKqVdRGw9KdQD/WN/o8ESUnKm2AVrO4JB FGCAQErMXBqXkWvS3sVSnAxWJdK/7qeS8Jt0ehsl5gQ8tFkwdeX6w/gcckgIqHyvhoMQ j4LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=q2u5lO7MfYaQmDNaKhbEhNM+gzgt17iLEp0XrGn6q0M=; b=lb5AoYlKtxLqBv1iXpus1z1NMb14bxglonWlAOHW1tLYElcoryD21wmkP2wmJrUOXc 2hgNBRfm1Ah7SxqWcsjiDw701fkyEbgIjhsOl9rqiGrCB2pnn2sfLCNDmL3JcS3hX5Q/ hc8vYNkN9WdQC85lIuxNJf9TMCRUcpGkfLEXQgZ5Zk3vtnYAydECCcU//hnAoXzMYlAi 14jmdF9/rDT8Oo0XzP6yfpz/QGDyFonEsRl4OrzxrQdksMM4NnoKnJaCcxB8xItnJHkV Ye9udmZvapynXdjFG7lL1ns0R9e8dNvrgFeqyDZ69+HGCmiC3ldGsDSLK8ylSndWiI3h nS5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=RU1P6pmP; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id cx22-20020a05640222b600b004a20d8b233esi731885edb.317.2023.01.27.01.10.11 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 01:10:11 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=RU1P6pmP; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2E9263858C33 for <ouuuleilei@gmail.com>; Fri, 27 Jan 2023 09:10:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E9263858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674810610; bh=q2u5lO7MfYaQmDNaKhbEhNM+gzgt17iLEp0XrGn6q0M=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=RU1P6pmPy9qOCMOeCebLzECwqVTanmn/cm3wJRNWyxN+JIWYnvYKbRIkRjVhmX9D+ IYt8ejZ0sCJcJM2d+MF/df4aK30NwvnKQIZDr2Pc7L+u+R5AiUlqRIOv/P+ThO3oFA i1AHppjBIUNpxTiKKsWNRJJE9Aswynn1eja+QOIw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id A68A1385840C for <gcc-patches@gcc.gnu.org>; Fri, 27 Jan 2023 09:09:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A68A1385840C Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-408-O3gG2M9TMH26eyP5KEcMRQ-1; Fri, 27 Jan 2023 04:09:22 -0500 X-MC-Unique: O3gG2M9TMH26eyP5KEcMRQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 82F85858F0E; Fri, 27 Jan 2023 09:09:22 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 38D30492B01; Fri, 27 Jan 2023 09:09:22 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 30R99JR6681394 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 27 Jan 2023 10:09:19 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 30R99Idq681393; Fri, 27 Jan 2023 10:09:18 +0100 Date: Fri, 27 Jan 2023 10:09:18 +0100 To: Richard Biener <rguenther@suse.de> Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] doc: Fix up return type of __builtin_va_arg_pack_len [PR108560] Message-ID: <Y9OUvmVFcSU5Eaix@tucnak> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Jakub Jelinek via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Jakub Jelinek <jakub@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756166211373011898?= X-GMAIL-MSGID: =?utf-8?q?1756166211373011898?= |
Series |
doc: Fix up return type of __builtin_va_arg_pack_len [PR108560]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jakub Jelinek
Jan. 27, 2023, 9:09 a.m. UTC
Hi! __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. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2023-01-27 Jakub Jelinek <jakub@redhat.com> PR other/108560 * doc/extend.texi: Fix up return type of __builtin_va_arg_pack_len from size_t to int. Jakub
Comments
On Fri, 27 Jan 2023, Jakub Jelinek wrote: > Hi! > > __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. Agreed. > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK. > 2023-01-27 Jakub Jelinek <jakub@redhat.com> > > PR other/108560 > * doc/extend.texi: Fix up return type of __builtin_va_arg_pack_len > from size_t to int. > > --- gcc/doc/extend.texi.jj 2023-01-24 11:10:13.218075138 +0100 > +++ gcc/doc/extend.texi 2023-01-26 17:13:47.428496682 +0100 > @@ -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 > > Jakub > >
--- gcc/doc/extend.texi.jj 2023-01-24 11:10:13.218075138 +0100 +++ gcc/doc/extend.texi 2023-01-26 17:13:47.428496682 +0100 @@ -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