Re: pgsql: Fix declaration after statement - Mailing list pgsql-committers

From Thomas Munro
Subject Re: pgsql: Fix declaration after statement
Date
Msg-id CA+hUKGKpHOGrj4LdY4DHvCFmk4TptV30JsNYiD2R2SzD=G_ckg@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Fix declaration after statement  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
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



pgsql-committers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: pgsql: Fix memory leak in pgbench
Next
From: Fabien COELHO
Date:
Subject: Re: pgsql: Fix memory leak in pgbench