From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id A42C43858C20 for ; Thu, 10 Nov 2022 01:39:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A42C43858C20 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,152,1665475200"; d="scan'208";a="86747232" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 09 Nov 2022 17:39:19 -0800 IronPort-SDR: Atms4ls9iy1tXJf0NJTedFIa0674r4RaLS6bn2xpz+5yu2uT3jwDkdCogoh4QDavWF/fwJ0lxD 4YzXeAr3eDnte2HwYLcfmzpTbvGMKYwqsG19pKX+0QGZjPFHYaB/1KquvpHi5QqipwwXOuEGAd X2M4JtoEF11nZZDdQBF5+Y06730D0jbQj49NIgV6IHb5NtCF12SFLwpL570q4OOdGGqH15ZFSo Em9aEUgWWR22V0zzkpqK6uip5LrHXFkN5bSPYQwZA8aDyXr9IxmhN0l8GhA0SgztUGpT70hVOs Bm8= Date: Thu, 10 Nov 2022 01:39:14 +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: <69d694b3-756-792d-8880-87bab482ea34@codesourcery.com> Message-ID: <76c083af-c01f-a4b2-3df-c83075c6b0de@codesourcery.com> References: <20220826210710.35237-1-alx.manpages@gmail.com> <89d79095-d1cd-ab2b-00e4-caa31126751e@gmail.com> <5ba53bad-019e-8a94-d61e-85b2f13223a9@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> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3110.1 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,RCVD_IN_MSPIKE_H2,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 Thu, 10 Nov 2022, Joseph Myers wrote: > On Thu, 10 Nov 2022, Alejandro Colomar via Gcc wrote: > > > I've shown the three kinds of prototypes that have been changed: > > > > - Normal VLA; nothing fancy except for the '.'. > > - Complex size expressions. > > - 'void *' VLAs (assuming GNU conventions: sizeof(void *)==1). > > That doesn't cover any of the tricky issues with such proposals, such as > the choice of which entity is referred to by the parameter name when there > are multiple nested parameter lists that use the same parameter name, or > when the identifier is visible from an outer scope (including in > particular the case where it's declared as a typedef name in an outer > scope). In fact I can't tell from these examples whether you mean for a '.' token after '[' to have special semantics, or whether you mean to have a special '. identifier' form of expression valid in certain context (each of which introduces its own complications; for the former, typedef names from outer scopes are problematic; for the latter, it's designated initializers where you get complications, for example). Designing new syntax that doesn't cause ambiguity is generally tricky, and this sort of language extension is the kind of thing where you'd expect to so through at least five iterations of a WG14 paper before you have something like a sound specification. -- Joseph S. Myers joseph@codesourcery.com