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.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 28841 invoked from network); 14 May 2023 08:19:54 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 14 May 2023 08:19:54 -0000 Received: from mail-lf1-f44.google.com ([209.85.167.44]) by 9front; Sun May 14 04:15:52 -0400 2023 Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-4eed764a10cso13024092e87.0 for <9front@9front.org>; Sun, 14 May 2023 01:15:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney.org; s=google; t=1684052150; x=1686644150; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=aWwU0cQR07Sm3aChI3qai9gAD39+nfm/N8Uz/yMfN94=; b=hQvHaHHOy5fSDwfBj21oUaCUH/eGj698osdtegPWI10dYZ4m02EkKe586tLBUZn2Y4 3Gx9sfVFFuCL6/RfClxKHaQ4CmZ1XZw5nxGH4wSbsU67MZdd9xivLEMnC7w2sl2CObzG a9CHwl+GeKH4tDLNoM2OWYc0VudDqPg+WtBAJ29+gtv+Vj66pXvlxrLwOpq2yF+QnMWM 95fSWufS2OlARyYI683HYSTC//HJLFMKUkbCHr1kb2urMI1+CeFrhRI84/xvC3kmtRSd Xy3ytfx+3/3W9xPtfhWKluEeYW4cPzjU96pCk9T2F/HwUCHct0RCdfhdlB45zji1v2cP gPyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684052150; x=1686644150; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aWwU0cQR07Sm3aChI3qai9gAD39+nfm/N8Uz/yMfN94=; b=bAIwjoLMZ/7LSaJMpPD6xBDdfSxJyOdNz3ChaOl7+eG9pve52bVSna/DPkl6gRVIqJ rvKJuClEmHfKx6tB+xv2glw3927PziXQMmqLDiEh2JZl3aVuQkaJrBQkaFdlWjiVrl7Z 54YKcU9Bb8Rzqip7dC9miBxTbL0O0t1h9NtT3R/I6oflgxF6MaBhByAEWP7yxTelUy6H VvaYHKfAYOZgnMV7jnjCt8GQffpVN9XoVHlcCOGAcxQ87HzfP6sC4YRgjnOTsmRcwYlV b/LQBkAitRWRjxD+EQ/khPeas2Wn6KSNG0J4Qth8p3qbvN0qjhCO7qvIx9re1HcRea6N SYmQ== X-Gm-Message-State: AC+VfDy4lPYThYaDlKHSC52Ytu2u++KPwBq4NPU3FYHHYZCAO3mDpWqh gCkPr1DsxSo+bOjISnlMVmmHRhaVNOVDSx1Rg/xPx2nEioiA+MVMqOo= X-Google-Smtp-Source: ACHHUZ4zKaXiA4jXDWPLaiBIsyFpP1SIXYcSW6XTU1pVVvwjquUn0KQE+nnQ7Qh1+K8z9NGiAhZQTRzNbL4Hy2282x8= X-Received: by 2002:ac2:558c:0:b0:4f2:56ed:f22f with SMTP id v12-20020ac2558c000000b004f256edf22fmr5752746lfg.22.1684051824398; Sun, 14 May 2023 01:10:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6022:8424:b0:3c:f33e:372d with HTTP; Sun, 14 May 2023 01:10:23 -0700 (PDT) X-Originating-IP: [2601:647:6400:20b0:16dd:a9ff:fee7:6b79] In-Reply-To: References: From: Michael Forney Date: Sun, 14 May 2023 01:10:23 -0700 Message-ID: To: 9front@9front.org Content-Type: text/plain; charset="UTF-8" List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: core dependency manager Subject: Re: [9front] [PATCH] cc: support const and restrict inside array declarations Reply-To: 9front@9front.org Precedence: bulk On 2023-05-13, mia soweli wrote: > this allows c23 style array declarations (see c23 draft section 6.7.6), > with type qualifiers inside the brackets. > 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. 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. > > they are ignored as with other uses of const, restrict, and volatile. > it does not allow > > int list[static 4]; > > which is also allowed in c23. Just FYI, all of the above (except noret, which is nonsense) are valid in C99. I don't think any of this changed in C23. See http://port70.net/~nsz/c/c99/n1256.html#6.7.5.2