On 03/04/2018 08:43 PM, Martin Storsjö wrote: > This fixes warnings when building libc++, like these: > > libcxx/include/locale:1198:18: warning: array subscript is of type 'char' > [-Wchar-subscripts] > if (!isxdigit_l(*__ns, _LIBCPP_GET_C_LOCALE)) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/ctype.h:211:41: note: expanded from macro '__chvalidchk' > #define __chvalidchk(a,b) (__PCTYPE_FUNC[(a)] & (b)) > ^~~~ > include/ctype.h:212:121: note: expanded from macro '_chvalidchk_l' > #define _chvalidchk_l(_Char,_Flag,_Locale) (!_Locale ? > __chvalidchk(_Char,_Flag) : ((_locale_t)_Locale)->locinfo->pctype[_Char] & > (_Flag)) > > ^~~~~~ > > If the char would happen to be >= 0x80 (i.e. negative) this would also > read outside of the bounds of the arrays. > > Signed-off-by: Martin Storsjö <[email protected]>
Looks good to me.
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
