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 1jvQ8U-0007XT-9X for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jul 2020 18:58:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jvQ8S-0000aK-Pm for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jul 2020 18:58:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jvQ8R-0000ZX-Ph for pgsql-hackers@lists.postgresql.org; Tue, 14 Jul 2020 18:58:36 +0000 Received: from forward3-smtp.messagingengine.com ([66.111.4.237]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jvQ8O-0001jn-Ql for pgsql-hackers@postgresql.org; Tue, 14 Jul 2020 18:58:34 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.nyi.internal (Postfix) with ESMTP id 43507194003F; Tue, 14 Jul 2020 14:58:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 14 Jul 2020 14:58:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=KRvheDBgWQKKtD6QTjCG1OCMsbyDQIbEvM51MKjx9 Gk=; b=dPC1gerP5Ao3LZD19decrYXqzxFyfiAUUGpUcp4oFh8ZIAdtUsUvhYuh8 Aj3Yc8jDrRpcoU8nvHyMtM7Yk/Y7QTYRQ9t6YTCEv3aE1mZ6gdRJgm+6T7TvWlfs SW8SWB1voKkE/TBWD6zW6ClwPB1wnqhVMJu9/9BHt1GyrqsR8kuwM3Gr4FHg3cBk 2rcfLT8Wzq2y/tR1+Yco7wZcLkJ1V7eyvWv+UQ7RpMVv8VeRK8Al3jAu3WbJam3P lvjARWQs8R65AQzhhQcAvgUMpITxesd1x9lBEfNkSs+s0appv83NEhNRG8jK2ond 3hy97MlgeUwUesXB5KnzKgvd1Xu1A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrfedtgddufeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuggftrfgrthhtvghrnheptdevgeehtdejvdevvdel jeeuveejjedtleelgfekleefieekjeelgfektdduuedvnecuffhomhgrihhnpedvnhguqh hurggurhgrnhhtrdgtohhmnecukfhppeelfedrvdegfedrudeluddrvdefkeenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvih hsvghnthhrrghuthesvdhnughquhgrughrrghnthdrtghomh X-ME-Proxy: Received: from april.pezone.net (p5df3bfee.dip0.t-ipconnect.de [93.243.191.238]) by mail.messagingengine.com (Postfix) with ESMTPA id C15813280068; Tue, 14 Jul 2020 14:58:29 -0400 (EDT) Subject: Re: warnings for invalid function casts To: Tom Lane References: <1e97628e-6447-b4fd-e230-d109cec2d584@2ndquadrant.com> <474790.1593526505@sss.pgh.pa.us> <20200630192135.nwlza2u57dy3qej4@alap3.anarazel.de> <496552.1593545900@sss.pgh.pa.us> <931660.1593787200@sss.pgh.pa.us> <1183184.1593872167@sss.pgh.pa.us> <2410175f-255d-ab5c-e95e-2dfc1bad3f97@2ndquadrant.com> <1527436.1594138095@sss.pgh.pa.us> Cc: Andres Freund , pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Tue, 14 Jul 2020 20:58:28 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1527436.1594138095@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-07-07 18:08, Tom Lane wrote: > Peter Eisentraut writes: >> On 2020-07-04 16:16, Tom Lane wrote: >>> I'm for a typedef. There is *nothing* readable about "(void (*) (void))", >>> and the fact that it's theoretically incorrect for the purpose doesn't >>> exactly aid intelligibility either. With a typedef, not only are >>> the uses more readable but there's a place to put a comment explaining >>> that this is notionally wrong but it's what gcc specifies to use >>> to suppress thus-and-such warnings. > >> Makes sense. New patch here. > > I don't have a compiler handy that emits these warnings, but this > passes an eyeball check. committed -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services