This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] assume sprintf formatting of wide characters may fail (PR 86853)
- From: Jeff Law <law at redhat dot com>
- To: David Edelsohn <dje dot gcc at gmail dot com>, Martin Sebor <msebor at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 3 Oct 2018 16:04:45 -0600
- Subject: Re: [PATCH] assume sprintf formatting of wide characters may fail (PR 86853)
- References: <CAGWvnynvoHKn7-x+-vprBMxPPDBO6ru8o7X+M5JE6mXk5RkaFQ@mail.gmail.com>
On 8/20/18 1:05 PM, David Edelsohn wrote:
> builtin-sprintf-warn-1.c, builtin-sprintf-warn-2.c, and
> builtin-sprintf-11.c now are failing on AIX. I expect that at least part
> of the reason is 32 bit AIX uses 16 bit wchar_t
>
> #ifdef __64BIT__
> typedef unsigned int wchar_t;
> #else
> typedef unsigned short wchar_t;
> #endif /* __64BIT__ */
>
> Are the new warnings making assumptions about the width of wchar_t?
>
> Do we want to skip some of these tests on AIX?
I'm testing a fix for this now. It seems to fix -1 and -2 just fine on AIX.
Jeff