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.89) (envelope-from ) id 1h7ZC1-0003IR-Jt for pgsql-committers@arkaria.postgresql.org; Sat, 23 Mar 2019 05:27:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h7ZC0-00084T-5P for pgsql-committers@arkaria.postgresql.org; Sat, 23 Mar 2019 05:27:40 +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 1h7ZBz-00084J-SS for pgsql-committers@lists.postgresql.org; Sat, 23 Mar 2019 05:27:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7ZBx-0002P1-Ap for pgsql-committers@lists.postgresql.org; Sat, 23 Mar 2019 05:27:38 +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 x2N5RWMH004624; Sat, 23 Mar 2019 01:27:32 -0400 From: Tom Lane To: David Rowley cc: Andres Freund , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Improve error reporting for DROP FUNCTION/PROCEDURE/AGGREGATE/RO In-reply-to: References: <20190323023333.tpovylk54modtlss@alap3.anarazel.de> Comments: In-reply-to David Rowley message dated "Sat, 23 Mar 2019 15:39:56 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4622.1553318852.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 23 Mar 2019 01:27:32 -0400 Message-ID: <4623.1553318852@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk David Rowley writes: > On Sat, 23 Mar 2019 at 15:33, Andres Freund wrote: >> I now get: >> /home/andres/src/postgresql/src/backend/parser/parse_func.c:2285:5: war= ning: this statement may fall through [-Wimplicit-fallthrough=3D] > hmm. Surprised your compiler can't see that's not possible. I guess we > just need a break on line 2335. Yeah, this no doubt is connected to what I noticed in commit 41c912cad: = Testing with gcc 8.0.1 (Fedora 28's current version), I found that I also had to put explicit "break"s after elog(ERROR) or ereport(ERROR= ); apparently, for this purpose gcc doesn't recognize that those don't return. That seems like possibly a gcc bug, but it's fine because in most places we did that anyway; so this amounts to a visit from the style police. Will add the break shortly. regards, tom lane