This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: Avoid "I64" format warnings while bootstrapping on mingw32 host


Mark Mitchell wrote:
> Based on Joseph's input, would you please try adding:
>
> WERROR += -Wno-format
>
> to t-mingw32 and bootstrapping with that?
>
> If it works, let me know, and I will write comments, etc., and check
> it in.
>
No it doesn't work,  The warnings with bootstrap are  a *host* problem
(the usages of HOST_WIDEST_INT_PRINT_* occur for functions that dump
diagnostics on host), However, even if put

> WERROR += -Wno-format

into host frag  x-mingw32

I still get the fatal warnings on mingw32 host.

I'll try to investigate further

On the host side, for mingw32, an alternative is to provide a  printf
family based on, say BSD, for the host, that although not thread-safe,
still is good enough and probably more efficient than  msvcrt printf.
In fact that is what I have doing in testing gcc during development,
because there are few testsuite cases that also need %ll

The target side of %I64 is a different problem.  Attached is an ugly
hack that I have been using in local mingw builds to avoid complaints
from mingw users.  I think it could be updated to use your  proto-patch
TARGET_EXTRA_PRINTF_FLAG_CHARS, but I need time to check that. The main
problkem is conflict between glibc %I and MSVC %iI64

Danny

> Thanks,


Attachment: i64_target_gcc34.patch
Description: Binary data


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