From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: A few warnings on Windows |
Date: | 2018-05-02 03:05:50 |
Message-ID: | 20180502030550.rqb5gkz7h5om4ou3@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2018-05-01 22:55:47 -0400, Peter Eisentraut wrote:
> On 5/1/18 16:48, Tom Lane wrote:
> > On more or less the same topic, I just scraped all the compiler warnings
> > for HEAD from the buildfarm database, and there seem to be a few other
> > things worth cleaning up. One that I'm looking at is that recent gcc
> > has a -Wimplicit-fallthrough warning for switch branches not separated
> > by a "break" or similar. It can be silenced with a comment similar to
> > /* FALLTHROUGH */, but we have not been entirely consistent about
> > providing such comments. I'm inclined to run around and fix those
> > omissions. Perhaps at some point we should have configure turn that
> > warning on if available?
>
> I think it's useful, but I have found it a bit fickle at times.
>
> One issue is <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79750>, which
> requires this additional patch
I've just committed a variant of this (moving, not duplicating the comment).
> Another issue that has prevented me in the past from taking this too
> seriously is requiring breaks after elog(ERROR) calls. I see you bit
> the bullet and added those breaks, which is fair enough. But if gcc
> ever fixes this bug
> (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79959) then as new code
> gets added without it, users of older compilers will start getting
> warnings. So we might have to craft that configure test to detect that
> issue when that time comes.
As long as we don't make those warnings errors, do we really care that
much? Also, seems easy enough to fix if necessary.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-05-02 03:33:25 | Re: pgsql: Clean up warnings from -Wimplicit-fallthrough. |
Previous Message | Peter Eisentraut | 2018-05-02 02:58:37 | Re: Global snapshots |