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 1nlJWi-0007G0-NK for pgsql-hackers@arkaria.postgresql.org; Mon, 02 May 2022 00:02:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nlJWh-0003ue-3i for pgsql-hackers@arkaria.postgresql.org; Mon, 02 May 2022 00:02:55 +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 1nlJWg-0003uV-Qi for pgsql-hackers@lists.postgresql.org; Mon, 02 May 2022 00:02:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nlJWa-0001Cm-FB for pgsql-hackers@postgresql.org; Mon, 02 May 2022 00:02:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 24202jvc1725175; Sun, 1 May 2022 20:02:45 -0400 From: Tom Lane To: Thomas Munro cc: pgsql-hackers Subject: Re: Tree-walker callbacks vs -Wdeprecated-non-prototype In-reply-to: References: Comments: In-reply-to Thomas Munro message dated "Mon, 02 May 2022 11:41:20 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1725173.1651449765.1@sss.pgh.pa.us> Date: Sun, 01 May 2022 20:02:45 -0400 Message-ID: <1725174.1651449765@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > As visible on seawasp (and noticed here in passing, while hacking on > the opaque pointer changes for bleeding edge LLVM), Clang 15 now warns > by default about our use of tree walkers functions with no function > prototype, because the next revision of C (C23?) will apparently be > harmonising with C++ in interpreting f() to mean f(void), not > f(anything goes). Ugh. I wonder if we can get away with declaring the walker arguments as something like "bool (*walker) (Node *, void *)" without having to change all the actual walkers to be exactly that signature. Having to insert casts in the walkers would be a major pain-in-the-butt. regards, tom lane