public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andres Freund <[email protected]>
To: Thomas Munro <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Hayato Kuroda (Fujitsu) <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Michael Meskes <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Nazir Bilal Yavuz <[email protected]>
Subject: Re: MinGW compiler warnings in ecpg tests
Date: Tue, 4 Nov 2025 13:34:29 -0500
Message-ID: <6sc6u7tlkxtkwepvfa5k7fzbmjddypkykwlde32ca2tpcdyfgz@mzdlehqv2cfs> (raw)
In-Reply-To: <o5yadhhmyjo53svzwvaocww6zkrp63i4f32cw3treuh46pxtza@hyqio5b2tkt6>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<TYAPR01MB5866A71B744BE01B3BF71791F5AEA@TYAPR01MB5866.jpnprd01.prod.outlook.com>
	<CA+hUKGKvkPh7XENM8QaF=B5-V84A6bThMLsyv1JM5XMcg9FeKw@mail.gmail.com>
	<[email protected]>
	<CA+hUKGJLMh+6W5E4M_jSFb43gnrA_-Q6-+Bf3HkBXyGfRFcBsQ@mail.gmail.com>
	<o5yadhhmyjo53svzwvaocww6zkrp63i4f32cw3treuh46pxtza@hyqio5b2tkt6>

Hi,

On 2025-10-30 17:39:24 -0400, Andres Freund wrote:
> On 2024-12-06 15:44:20 +1300, Thomas Munro wrote:
> > On Fri, Dec 6, 2024 at 4:13 AM Tom Lane <[email protected]> wrote:
> > > Thomas Munro <[email protected]> writes:
> > > > Yeah.  This warning is visible on CI, and on fairywren since its MSYS2
> > > > upgrade a couple of months ago.  Old MinGW didn't like %lld (I think
> > > > perhaps the printf from msvcrt.dll from 1996 didn't like it and MinGW
> > > > knew that), but new MinGW doesn't like %I64d (that's interesting, but
> > > > not relevant here because %lld is clearly the correct format string,
> > > > and it works).  We should just revert that change.  Here's a patch.
> > >
> > > +1
> > 
> > Thanks for looking.  Pushed, and that fixed that on fairywren.
> > 
> > > > Those were there before the upgrade.  POSIX says that environ should
> > > > not be declared by a header, but Windows apparently declares it, or at
> > > > least its cousin _environ, in <stdlib.h> which we include in c.h.  I
> > > > have no idea why Visual Studio doesn't warn, or why the documentation
> > > > only tells you about _environ and not environ, or where the macro (?)
> > > > comes from that renames it, but it passes CI and is
> > > > warning-free on both toolchains if you just hide the offending
> > > > declarations.
> > >
> > > Isn't this likely to break things for every other Windows toolchain?
> > > I think the concept might be OK, but we need a tighter #if condition.
> > 
> > Cool, I'll do that for MinGW only then.
> 
> I was looking at merging [1], however the backbranches < 18 fail in
> CompilerWarnings due to this error [2], after upgrading to trixie. Seems like
> we ought to backpatch 7bc9a8bdd2d.  Haven't checked yet whether 1319997d is
> also required for a clean build.

After verifying that 1319997d is not required I backpatched 7bc9a8bdd2d to all
the branches lacking it.

Greetings,

Andres Freund





view thread (10+ messages)

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], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: MinGW compiler warnings in ecpg tests
  In-Reply-To: <6sc6u7tlkxtkwepvfa5k7fzbmjddypkykwlde32ca2tpcdyfgz@mzdlehqv2cfs>

* 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