From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 2D7EE3858D37 for ; Sat, 12 Nov 2022 14:54:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2D7EE3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.96,159,1665475200"; d="scan'208";a="86580248" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 12 Nov 2022 06:54:16 -0800 IronPort-SDR: LX3Ug+swcAwDjxU09k5DvZ85m8CL/PBNkC872ip3lGg7Xl4qgQ684MvQwU+nwA0xiVt79wMZqk Bu/4IEUuwugdNQuSA+SxheeoUL57j834jeyYSrVs47qw5LUZkHEmHF/8/Mp4fqflDDwd6IU+it bIpNSPdeIn5ukc8mDZsqAjltlhFm054Oic7tOyK+hz3UJOzH7ca6UiVM83bvM/jeWnssDivk3i zagSBkndVyzV2i3/59xnPqum4G0Pave/VQ+yN9BZYiQVh2n5gxTdATGj0EXmO3Cqdu4+ALlgY+ srw= Date: Sat, 12 Nov 2022 14:54:10 +0000 From: Joseph Myers To: Alejandro Colomar CC: Martin Uecker , Ingo Schwarze , JeanHeyd Meneide , , Subject: Re: [PATCH] Various pages: SYNOPSIS: Use VLA syntax in function parameters In-Reply-To: Message-ID: <5ae032cd-7a5f-f72b-29ae-6ad7f418da8@codesourcery.com> References: <20220826210710.35237-1-alx.manpages@gmail.com> <491a930d-47eb-7c86-c0c4-25eef4ac0be0@gmail.com> <2abccaa2-d472-4c5b-aea6-7a2dddd665da@gmail.com> <4475b350c2a4d60da540c0f3055f466640e6c409.camel@tugraz.at> <51f5a2f2-84c1-bc75-cf94-0cdc1771d37f@gmail.com> <4e3fee795769544738b3dc793aa95d6b34b72047.camel@tugraz.at> <69d694b3-756-792d-8880-87bab482ea34@codesourcery.com> <76c083af-c01f-a4b2-3df-c83075c6b0de@codesourcery.com> <75c352c-e8b5-90d0-5fae-7b211c647934@codesourcery.com> <68746776-87bf-80f9-8e3e-7392e8cef1bb@gmail.com> <77c3557f-4a62-3ede-4df4-4b2b78e265b1@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3110.0 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sat, 12 Nov 2022, Alejandro Colomar via Gcc wrote: > Since it's to be used as an rvalue, not as a lvalue, I guess a > postfix-expression wouldn't be the right one. Several forms of postfix-expression are only rvalues. > > (with a special rule about how the identifier is interpreted, different > > from the normal scope rules)? If so, then ".a = 1" could either match > > assignment-expression directly (assigning to the postfix-expression ".a"). > > No, assigning to a function parameter from within another parameter > declaration wouldn't make sense. They should be readonly. Side effects > should be forbidden, I think. Such assignments are already allowed. In a function definition, the side effects (including in size expressions for array parameters adjusted to pointers) take place before entry to the function body. And, in any case, if you did have a constraint disallowing such assignments, it wouldn't suffice for syntactic disambiguation (see the previous point I made about that; I have some rough notes towards a WG14 paper on syntactic disambiguation, but haven't converted them into a coherent paper). -- Joseph S. Myers joseph@codesourcery.com