public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bertrand Drouvot <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: [email protected]
Subject: Re: Enable -Wstrict-prototypes and -Wold-style-definition by default
Date: Fri, 27 Mar 2026 10:07:40 +0000
Message-ID: <acZW7FB/[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <aa73q1aT0A3/vke/@ip-10-97-1-34.eu-west-3.compute.internal>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Hi,
On Fri, Mar 27, 2026 at 08:38:45AM +0100, Peter Eisentraut wrote:
> The first three patches have been committed.
>
> On 24.03.26 08:16, Bertrand Drouvot wrote:
> > 0004:
> >
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -2199,6 +2199,7 @@ unroll_loops_cflags = cc.get_supported_arguments(['-funroll-loops'])
> > common_warning_flags = [
> > '-Wmissing-prototypes',
> > + '-Wold-style-declaration',
> >
> > Nit, what about adding it with (as the comment is also accurate for the new one)?
> >
> > "
> > # These are C-only flags, supported in all C11-capable GCC/Clang versions.
> > cflags_warn += cc.get_supported_arguments(['-Wstrict-prototypes', '-Wold-style-definition'])
> > "
>
> Yeah, makes sense to collect the C-only flags together. But now that I'm
> looking at this again, the comment "supported in all C11-capable GCC/Clang
> versions" is not relevant here, it was only relevant in configure.ac because
> there we don't actually test for these flags but require them without
> testing.
Right, it was a bit misleading.
> What do you think about the attached patch, which reorganizes this
> a bit more?
+# C-only warnings
+c_warning_flags = [
+ '-Wmissing-prototypes',
+ '-Wold-style-declaration',
+ '-Wold-style-definition',
+ '-Wstrict-prototypes',
+]
That looks ok but I wonder if we should also add '-Werror=vla' to it (
and remove it from common_warning_flags) to be in sync with what configure.ac
is doing:
"
PGAC_PROG_CC_CFLAGS_OPT([-Werror=vla])
# -Wvla is not applicable for C++
"
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
view thread (18+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Enable -Wstrict-prototypes and -Wold-style-definition by default
In-Reply-To: <acZW7FB/[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox