pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Fix declaration after statement
4+ messages / 4 participants
[nested] [flat]
* pgsql: Fix declaration after statement
@ 2019-04-11 03:57 Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-04-11 05:05 ` Re: pgsql: Fix declaration after statement Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Alvaro Herrera @ 2019-04-11 03:57 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix declaration after statement
This style is frowned upon. I inadvertently introduced one in commit
fe0e0b4fc7f0. (My compiler does not complain about it, even though
-Wdeclaration-after-statement is specified. Weird.)
Author: Masahiko Sawada
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/65d857d92c418d732e3531a3761a32f2e352cb35
Modified Files
--------------
src/bin/pgbench/pgbench.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Fix declaration after statement
2019-04-11 03:57 pgsql: Fix declaration after statement Alvaro Herrera <alvherre@alvh.no-ip.org>
@ 2019-04-11 05:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-04-11 05:19 ` Re: pgsql: Fix declaration after statement Thomas Munro <thomas.munro@gmail.com>
2019-04-11 13:29 ` Re: pgsql: Fix declaration after statement Alvaro Herrera <alvherre@2ndquadrant.com>
0 siblings, 2 replies; 4+ messages in thread
From: Tom Lane @ 2019-04-11 05:05 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: pgsql-committers@lists.postgresql.org
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> (My compiler does not complain about it, even though
> -Wdeclaration-after-statement is specified. Weird.)
longfin's compiler doesn't either (clang-1001.0.46.3).
What are you using? Maybe we should be filing bug reports?
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Fix declaration after statement
2019-04-11 03:57 pgsql: Fix declaration after statement Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-04-11 05:05 ` Re: pgsql: Fix declaration after statement Tom Lane <tgl@sss.pgh.pa.us>
@ 2019-04-11 05:19 ` Thomas Munro <thomas.munro@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Munro @ 2019-04-11 05:19 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; pgsql-committers <pgsql-committers@lists.postgresql.org>
On Thu, Apr 11, 2019 at 5:05 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > (My compiler does not complain about it, even though
> > -Wdeclaration-after-statement is specified. Weird.)
>
> longfin's compiler doesn't either (clang-1001.0.46.3).
> What are you using? Maybe we should be filing bug reports?
If you're filing a complaint, note that that's not a real clang
version number, that's Apple's unhelpful parallel version system.
clang 9 isn't out yet. According to [1], Apple clang "10.0.1" is
really upstream clang 7 (and Apple clang "10.0.0" is upstream clang 6,
despite deferring only in the "patch" component of the version). The
crazy thing is that it *almost* lines up with the Xcode version
numbers, but not quite.
I just tested clang 8 (FreeBSD 13 system compiler) and clang 9 (ports
llvm-devel, which tracks bleeding edge llvm head) and they both seem
to ignore -Wdeclaration-after-statement. GCC 8 warns for my test
program.
[1] https://en.wikipedia.org/wiki/Xcode#Latest_versions
--
Thomas Munro
https://enterprisedb.com
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Fix declaration after statement
2019-04-11 03:57 pgsql: Fix declaration after statement Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-04-11 05:05 ` Re: pgsql: Fix declaration after statement Tom Lane <tgl@sss.pgh.pa.us>
@ 2019-04-11 13:29 ` Alvaro Herrera <alvherre@2ndquadrant.com>
1 sibling, 0 replies; 4+ messages in thread
From: Alvaro Herrera @ 2019-04-11 13:29 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org
On 2019-Apr-11, Tom Lane wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > (My compiler does not complain about it, even though
> > -Wdeclaration-after-statement is specified. Weird.)
>
> longfin's compiler doesn't either (clang-1001.0.46.3).
> What are you using? Maybe we should be filing bug reports?
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
under
ccache version 3.4.1
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2019-04-11 13:29 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-04-11 03:57 pgsql: Fix declaration after statement Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-04-11 05:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-04-11 05:19 ` Thomas Munro <thomas.munro@gmail.com>
2019-04-11 13:29 ` Alvaro Herrera <alvherre@2ndquadrant.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox