On Sun, Sep 20, 2009 at 1:08 AM, Erik de Castro Lopo
<mle+...@mega-nerd.com> wrote:
> Ozkan Sezer wrote:
>
>> OK, applied this as rev. 1395:
>> http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64?view=rev&revision=1395
>> Please test.
>
> Real close!
>
> I get the proper C99 behaviour if I compile with:
>
>     x86_64-w64-mingw32-gcc -Wall -std=c99 test.c -o test
>
> but with this:
>
>     x86_64-w64-mingw32-gcc -Wall -std=gnu99 test.c -o test
>
> I still get the same error. It would be nice if this could be fixed for
> gnu99 as well.
>
> Cheers,
> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/

That is because with -std=c99, gcc predefines __STRICT_ANSI_,  but
with -std=gnu99 it does not, because gnu99 is not _strictly_ ansi and
includes gnu extensions.  The idea behind our commit rev. 1395 is
trying to catch ith implications of user's need of ansi i/o, and in
my opinion -std=gnu99 may not be in that category.  Please define
__USE_MINGW_ANSI_STDIO=1 for it.

Enabling the __mingw_printf family for both c99 and gnu99 mode is
actually easy, I would only add a  __STDC_VERSION__ >= 199901L
preprocessor check, but as I said I think it might not be right.
Kai, what do you think?

A question, though: Are you using gcc-3.4.5 or 4.4.0 as the mingw.org
compiler for your w32 builds?  I think the warning may be a gcc-4.4+
thing and not actually a mingw-w64 issue, but I don't know for sure.

--
Ozkan

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to