From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 5889B398683E for ; Fri, 4 Sep 2020 07:13:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5889B398683E Received: by mail-ej1-x62b.google.com with SMTP id gr14so6107499ejb.1 for ; Fri, 04 Sep 2020 00:13:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=00a1DIpdGVW2lHg3GUI8l+nRiHYr7mSaglYUQU7r8EA=; b=uMWUVrlRC3LZqqeDD6iHOz5RS2VAk5iTTEkC/yJdCDKhw/2AW8LouguV7zZzXI8oyq NEaX0d+g8DdnoVTX13eakERRASG6WKPg3TGVL0mZe+WdH0++QjgoE8JD/giXLSPSaka4 gOVxR+yamJIw5CAi6WKXjDQEnZdqprddeR55E0JT9nPpdXcJ5qFfJYb7UDQSxRb8l7xR Rx/hg0oerdbkHPgPC1nfN4HCQbourzmLcXmjFi7oE2L33y9eT/LXnvBQu9ziQYSjADZR 8zINYVixaqOQJ0xN5XpzIBkAD6yLJwXhSOV3i9rVKyQQJescuy3y6y7Y8sJfQcO6EmLK iBwg== X-Gm-Message-State: AOAM531f7dqYuQWtcutsmAViqT7u3SWZWZ6Dq2VSULLf4EkQx+HEA9BO qydMWKUq8M8tAorbHGexoObIPpI/emREbYTt5sc= X-Google-Smtp-Source: ABdhPJzE9gNJEZk5EG3227je7iatifcpx9NX4CVKVj+p3nTU+3JJ3L8LORoOZKZEkFXpiKGHCpZLn7sHziMMAyyX45Y= X-Received: by 2002:a17:906:38c7:: with SMTP id r7mr6243698ejd.118.1599203632369; Fri, 04 Sep 2020 00:13:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Fri, 4 Sep 2020 09:13:41 +0200 Message-ID: Subject: Re: A silly question regarding function types To: Gary Oblock Cc: "gcc@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2020 07:13:54 -0000 On Fri, Sep 4, 2020 at 4:39 AM Gary Oblock via Gcc wrote: > > Note, isn't a problem, rather, it's something that puzzles me. > > On walking a function types argument types this way > > for ( arg =3D TYPE_ARG_TYPES ( func_type); > arg !=3D NULL; > arg =3D TREE_CHAIN ( arg)) > { > . > . > } > > I noticed an extra void argument that didn't exist > tagged on the end. > > I then noticed other code doing this (which I copied:) > > for ( arg =3D TYPE_ARG_TYPES ( func_type); > arg !=3D NULL && arg !=3D void_list_node; > arg =3D TREE_CHAIN ( arg)) > { > . > . > } > > What is going on here??? Without a void_list_node on the end it's a variadic function > Thanks, > > Gary > > > > CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, i= s for the sole use of the intended recipient(s) and contains information th= at is confidential and proprietary to Ampere Computing or its subsidiaries.= It is to be used solely for the purpose of furthering the parties' busines= s relationship. Any unauthorized review, copying, or distribution of this e= mail (or any attachments thereto) is strictly prohibited. If you are not th= e intended recipient, please contact the sender immediately and permanently= delete the original and any copies of this email and any attachments there= to.