Files
Liviu Nicoara ee64207a98 <wchar.h>: Define __CORRECT_ISO_CPP_WCHAR_H_PROTO for Clang [BZ #34692]
Without the asm redirects, wcschr et al. are not const-correct.

Commit 953ceff17a widened the guard of
__CORRECT_ISO_CPP_STRING_H_PROTO in <string.h> to Clang 3.5 and later
[BZ #25232].  <wchar.h> kept the guard it had since 2009, so under
Clang with libstdc++ or with just the C headers, wcschr, wcspbrk,
wcsrchr, wcsstr, wcswcs and wmemchr have only the C prototype.  A
const wchar_t * argument then yields a wchar_t * result without a
diagnostic.

This change applies the <string.h> condition to <wchar.h>.  It does
not impact GCC.

Checked on x86_64-linux-gnu with GCC 16.2.1 and Clang 22.1.8.

Signed-off-by: Liviu Nicoara <lnicoara@thinkoid.org>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2026-10-07 07:43:20 -03:00
..
2000-09-06 22:15:07 +00:00
2011-10-23 14:14:26 -04:00
2011-12-17 14:14:58 -05:00
2011-10-23 14:11:50 -04:00
2023-06-14 18:10:24 +02:00