Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5TUj-0007hq-GK for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 15:16:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p5TTk-00021d-Dj for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 15:15:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5TTj-00021J-GP for pgsql-hackers@lists.postgresql.org; Wed, 14 Dec 2022 15:15:28 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5TTa-0002Bf-V1 for pgsql-hackers@postgresql.org; Wed, 14 Dec 2022 15:15:27 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id B88CE5803BA; Wed, 14 Dec 2022 10:15:16 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 14 Dec 2022 10:15:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1671030916; x= 1671038116; bh=0OYFN3HGIQ1bCDUZweDthtPc3iigRKh5bdgt+Sejkag=; b=W d0kWJGLCGUoRMzfg7cmEZdhGIC1EaO9b7/Noj0xMdqXkNn3ljIQmgAIoEJdV1NTm QyCNZYhkvIcslRNxp33IjuUQJ/dGx1mXp1naPO+gHwhd92jq1rYbN5UMFRtVwPuC XVF6vPDKFhEoWWv9JRRsbGS00Zlg18ruFaiy5nYaUvsGNWtXHT5jELqWF2ZtzJXr YFW8ENLwe+mToQVHZ7pQjYwOs6Yt+43rCsCruwDJMQnTR/t3ni7oVg0/DIHWiNQZ a6W7NUYofp/igSS/1P8yKKwN2RAqkRGLUVM7/GYwSGnpCMfW/1PZ6739ddhnmM43 Pgw98QT4I149/Q4sMCUAA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheelffeggedujeetiefh leetuddvieffhfffvdejvdffgeejkeduleduheduieefnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Dec 2022 10:15:15 -0500 (EST) Message-ID: <7d41d99f-25ac-7673-9b4b-7601db7c1ddb@enterprisedb.com> Date: Wed, 14 Dec 2022 16:15:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: static assert cleanup Content-Language: en-US To: Peter Smith Cc: pgsql-hackers References: <941a04e7-dd6f-c0e4-8cdf-a33b3338cbda@enterprisedb.com> From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11.12.22 23:18, Peter Smith wrote: > +StaticAssertDecl(SysCacheSize == (int) lengthof(cacheinfo), > + "SysCacheSize does not match syscache.c's array"); > + > static CatCache *SysCache[SysCacheSize]; > > In almost every example I found of StaticAssertXXX, the lengthof(arr) > part came first in the condition. Since you are modifying this anyway, > should this one also be reversed for consistency? Makes sense. I have pushed this separately.