From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Improve error reporting for DROP FUNCTION/PROCEDURE/AGGREGATE/RO |
Date: | 2019-03-23 05:27:32 |
Message-ID: | 4623.1553318852@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> writes:
> On Sat, 23 Mar 2019 at 15:33, Andres Freund <andres(at)anarazel(dot)de> wrote:
>> I now get:
>> /home/andres/src/postgresql/src/backend/parser/parse_func.c:2285:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-03-23 05:33:16 | pgsql: Add unreachable "break" to satisfy -Wimplicit-fallthrough. |
Previous Message | Andres Freund | 2019-03-23 02:57:49 | pgsql: Expand EPQ tests for UPDATEs and DELETEs |