Re: Should we remove -Wdeclaration-after-statement?

From: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
To: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Cc: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, "ranier(dot)vf(at)gmail(dot)com" <ranier(dot)vf(at)gmail(dot)com>, chap(at)anastigmatix(dot)net
Subject: Re: Should we remove -Wdeclaration-after-statement?
Date: 2024-01-29 15:35:03
Message-ID: CAMsGm5e_-L94=BQwEMGWV5kGdMcrbV6u_nfBq1LqyStCRNPUqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 29 Jan 2024 at 10:31, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
wrote:

>
>
> > On Jan 29, 2024, at 7:03 AM, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
> wrote:
> >
> > So my suggestion is for people to respond with -1, -0.5, +-0, +0.5, or
> > +1 to indicate support against/for the change.
>
> -1 for me.
>
> -Infinity for refactoring the entire codebase and backpatching.
>

I don't think anybody is proposing re-working the existing codebase. I
understand this to be only about allowing new code to use the newer style.
Personally, I like, as much as possible, to use initializations to const
variables and avoid assignment operators, so I much prefer to declare at
first (and usually only) assignment.

But not voting because the amount of code I’ve actually contributed is
minuscule.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2024-01-29 15:35:51 Re: [PATCH] Add native windows on arm64 support
Previous Message Mark Dilger 2024-01-29 15:31:38 Re: Should we remove -Wdeclaration-after-statement?