This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 00/11] C++/MinGW patches
- From: Qian Hong <fracting at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Iain Buclaw <ibuclaw at gdcproject dot org>
- Date: Tue, 3 Nov 2015 05:16:17 +0800
- Subject: Re: [PATCH 00/11] C++/MinGW patches
- Authentication-results: sourceware.org; auth=none
- References: <1446492970-21432-1-git-send-email-palves at redhat dot com> <5637C1FA dot 2060708 at redhat dot com> <CALd+sZThHQQFq4DSw9Dd0pXVfYmAq=RFj0GM1OtmSXv8OwL4sg at mail dot gmail dot com> <5637CB96 dot 4010106 at redhat dot com>
- Reply-to: fracting at gmail dot com
Hi Pedro, thanks a lot for the reply!
On Tue, Nov 3, 2015 at 4:46 AM, Pedro Alves <palves@redhat.com> wrote:
> It just looks like msvcrt.dll's printf prints using an
> unexpected format? Maybe building the test program with
> __USE_MINGW_ANSI_STDIO defined fixes it. Could you try that?
Yes, msvcrt.dll's printf has a different format than gcc Linux.
I just tried your suggestion but it doesn't make a change, later then
I use __mingw_printf to write a small test case, and found MinGW also
emulate msvcrt's format.
#include <stdio.h>
int main()
{
double x = 3.40282e+038;
__mingw_printf("%.5e\n", x);
}
$ i686-w64-mingw32-gcc test2.c -o test2.exe
$ wine test2.exe # same result on Windows, just tested
3.40282e+038
--
Regards,
Qian Hong
-
http://www.winehq.org