Re: [Mingw-w64-public] [PATCH] headers: Add casts in ua_wcs*chr in stralign.h

2017-08-25 Thread Martin Storsjö
On Fri, 25 Aug 2017, Martin Storsjö wrote: On Fri, 25 Aug 2017, Mateusz Mikuła wrote: No problem, it was left forgotten there. Yes I was making clang able to host itself at MSYS2 and ran into this error on 64bit builds. If Lio says C-style cast is fine then I'm OK with that. I'm 80% sure I'v

Re: [Mingw-w64-public] [PATCH] headers: Add casts in ua_wcs*chr in stralign.h

2017-08-25 Thread Martin Storsjö
On Fri, 25 Aug 2017, Mateusz Mikuła wrote: No problem, it was left forgotten there. Yes I was making clang able to host itself at MSYS2 and ran into this error on 64bit builds. If Lio says C-style cast is fine then I'm OK with that. I'm 80% sure I've seen this in another project as well and GC

Re: [Mingw-w64-public] [PATCH] headers: Add casts in ua_wcs*chr in stralign.h

2017-08-25 Thread JonY via Mingw-w64-public
On 08/25/2017 09:12 AM, Martin Storsjö wrote: > When building libcxx, a version of wcschr that returns const > is provided, breaking compilation here since the return from > wcschr is returned directly as if it were a const pointer. > By adding these casts, compilation succeeds. > > This matches t

Re: [Mingw-w64-public] [PATCH] headers: Add casts in ua_wcs*chr in stralign.h

2017-08-25 Thread Mateusz Mikuła
ption is better and this patch should be committed. You can add my sign-off if you want but it's not important. -- Original Message -- Subject: Re: [Mingw-w64-public] [PATCH] headers: Add casts in ua_wcs*chr in stralign.h Date: Fri, 25 Aug 2017 14:23:09 +0300 (EEST) To: Mingw-w64

Re: [Mingw-w64-public] [PATCH] headers: Add casts in ua_wcs*chr in stralign.h

2017-08-25 Thread Liu Hao
On 2017/8/25 19:09, Mateusz Mikuła wrote: There was discussion if this should be done via cast or union, both versions were attached at some point of [1] discussion. [1] https://sourceforge.net/p/mingw-w64/mailman/message/35923114/ C-style casts shall suffice. I don't see why we have to introdu

Re: [Mingw-w64-public] [PATCH] headers: Add casts in ua_wcs*chr in stralign.h

2017-08-25 Thread Martin Storsjö
On Fri, 25 Aug 2017, Mateusz Mikuła wrote: There was discussion if this should be done via cast or union, both versions were attached at some point of [1] discussion. [1] https://sourceforge.net/p/mingw-w64/mailman/message/35923114/ Oh, I see - sorry for missing that. I don't mind whichever

Re: [Mingw-w64-public] [PATCH] headers: Add casts in ua_wcs*chr in stralign.h

2017-08-25 Thread Mateusz Mikuła
There was discussion if this should be done via cast or union, both versions were attached at some point of [1] discussion. [1] https://sourceforge.net/p/mingw-w64/mailman/message/35923114/ 2017-08-25 11:12 GMT+02:00 Martin Storsjö : > When building libcxx, a version of wcschr that returns const

[Mingw-w64-public] [PATCH] headers: Add casts in ua_wcs*chr in stralign.h

2017-08-25 Thread Martin Storsjö
When building libcxx, a version of wcschr that returns const is provided, breaking compilation here since the return from wcschr is returned directly as if it were a const pointer. By adding these casts, compilation succeeds. This matches the calls to uaw_wcschr and uaw_wcsrchr directly below, hav