From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 916 invoked from network); 14 May 2023 10:27:52 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 14 May 2023 10:27:52 -0000 Received: from one.net.tachibana-labs.org ([78.141.198.89]) by 9front; Sun May 14 06:23:15 -0400 2023 Received: from [127.0.0.1] (cpc99362-croy26-2-0-cust24.19-2.cable.virginm.net [80.195.49.25]) by one.net.tachibana-labs.org (OpenSMTPD) with ESMTPSA id 71f00ad5 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 14 May 2023 10:23:13 +0000 (UTC) Date: Sun, 14 May 2023 11:23:12 +0100 From: mia soweli To: 9front@9front.org, Michael Forney User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: <51B24F80-9061-4A69-B48E-74C21346BD32@tachibana-labs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: reduce/map NoSQL controller Subject: [9front] =?US-ASCII?Q?Re=3A_=5B9front=5D_=5BPATCH=5D_cc=3A_support_const?= =?US-ASCII?Q?_and_restrict_inside_array_declarations?= Reply-To: 9front@9front.org Precedence: bulk in our c compilers, const, volatile, restrict, and noret fall under the sam= e yacc rule "gname", so by allowing "zgnlist" in array brackets we would al= so end up allowing int a[noret 4]=2E it would need some changes to not allow this=2E On 14 May 2023 09:10:23 BST, Michael Forney wrote: >On 2023-05-13, mia soweli wrote: >> this allows c23 style array declarations (see c23 draft section 6=2E7= =2E6), >> with type qualifiers inside the brackets=2E >> for example: >> >> const int list[restrict 4]; >> int list[const 4]; >> int list[const restrict 4]; >> int list[volatile 4]; >> int list[noret 4]; /* we may not want to allow this */ > >I have no idea what this is=2E Maybe you are thinking of noreturn? Even >so, _Noreturn (what noreturn is defined as) is a function-specifier, >not a type-qualifier, and is not allowed in the brackets of an array >declarator in any C standard=2E > >> >> they are ignored as with other uses of const, restrict, and volatile=2E >> it does not allow >> >> int list[static 4]; >> >> which is also allowed in c23=2E > >Just FYI, all of the above (except noret, which is nonsense) are valid >in C99=2E I don't think any of this changed in C23=2E > >See http://port70=2Enet/~nsz/c/c99/n1256=2Ehtml#6=2E7=2E5=2E2