Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jGyls-0008AF-DZ for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2020 05:40:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jGylq-000222-Nh for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2020 05:40:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jGylq-00021v-BD for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2020 05:40:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jGyln-0003ah-Rf for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2020 05:40:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 02P5dvkR028623; Wed, 25 Mar 2020 01:39:57 -0400 From: Tom Lane To: Thomas Munro cc: Andres Freund , Amit Kapila , Michael Paquier , Julien Rouhaud , Masahiko Sawada , PostgreSQL Hackers Subject: Re: Missing errcode() in ereport In-reply-to: References: <32174.1584454158@sss.pgh.pa.us> <20200319175902.vjib2tslosw65iyr@alap3.anarazel.de> <5063.1584641224@sss.pgh.pa.us> <20200319230446.lxjybufdcgwaqkhj@alap3.anarazel.de> <5995.1584660775@sss.pgh.pa.us> <20200320015908.ajxneh4jx6avqegv@alap3.anarazel.de> <9966.1584671550@sss.pgh.pa.us> <20200320045637.n3xo6gcmbqcg42tq@alap3.anarazel.de> <15922.1584715221@sss.pgh.pa.us> <31649.1584998689@sss.pgh.pa.us> <20200324193834.dojfetuxqupii577@alap3.anarazel.de> <6677.1585081791@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Wed, 25 Mar 2020 18:27:56 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28621.1585114797.1@sss.pgh.pa.us> Date: Wed, 25 Mar 2020 01:39:57 -0400 Message-ID: <28622.1585114797@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > I think this caused anole to say: > "reloptions.c", line 1362: error #2042: operand types are incompatible > ("void" and "int") > errdetail_internal("%s", _(optenum->detailmsg)) : 0)); Yeah, I was just looking at that :-( We could revert the change to have these functions return void, or we could run around and change the places with this usage pattern to use "(void) 0" instead of just "0". The latter would be somewhat painful if only minority compilers warn, though. Also, I don't think that having to change ereport usage was part of the agreed-to plan here ... so I'm leaning to the former. regards, tom lane