That flag also fixes the return values of certain functions like
vsnprintf where the Microsoft behavior deviated from the standard.

--David

On Tue, Sep 6, 2016 at 3:01 PM, Jeroen Ooms <[email protected]> wrote:
> On Tue, Sep 6, 2016 at 8:50 PM, Stefan Weil <[email protected]> wrote:
>> I suggest using the ANSI format specifiers ("%lld" is correct in
>> your example) and telling the compiler that you do so. Add
>> -D__USE_MINGW_ANSI_STDIO=1 to the compiler options
>> (or define that macro before including any header files).
>>
>> If you use ANSI format specifiers, those code lines will also
>> work on non-Windows platforms - maybe this is also important
>> for you.
>
> Thank you, that seems to work. Does this flag have any further side
> effects, rather than the format specifiers? Why doesn't mingw-w64
> default to ANSI C when compiling with -std=gnu99 ?
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to