This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB 7.99.91 MinGW compilation error in cli-script.c

On 05/22/2017 07:42 PM, Eli Zaretskii wrote:
>> Cc:,,
>> From: Pedro Alves <>
>> Date: Mon, 22 May 2017 16:26:19 +0100
>> Is there still a reason for the "#include <_mingw.h>"?
> Yes, that's where _GLIBCXX_USE_C99 is defined.


>> Otherwise, if
>> - older broken mingw releases get the replacement
>> - newer fixed mingw releases don't get the replacement
>> - mingw-w64 doesn't get the replacement (as it doesn't need one IIUC)
>> then it's fine with me.
> Hmmm... I see that MinGW64 doesn't define _GLIBCXX_USE_C99 in its
> system headers, 

I'm surprised mingw does this, because that's a libstdc++
internal symbol...

> so I guess I will have to add the
> __MINGW64_VERSION_MAJOR guard as well.

Please also take a look at the fix for:

which suggests to me that newer compilers against older mingw
might actually be fixed, independently of the _GLIBCXX_USE_C99 hack?

>> It'd be useful for the archives if you expanded on which mingw versions
>> and compilers you tested this on.  Also likewise a short comment to
>> the effect in the code would be likewise handy for future readers
> OK, will do.
>> (please use /**/ style comments).
> I thought I did...

The comments you had added in the original patch used // style:

 +// For versions of's MinGW runtime before 5.0, make sure
 +// libstdc++ headers don't omit portions that require C99.

Pedro Alves

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]