Re: [PATCH] libstdc++: Use const_cast to workaround tm_zone being non-const

2025-03-26 Thread Iain Sandoe
> On 26 Mar 2025, at 17:50, Jonathan Wakely wrote: > > Iain reported that he's seeing this on Darwin: > > include/bits/chrono_io.h:914: warning: ISO C++ forbids converting a string > constant to 'char*' [-Wwrite-strings] > > This is because the BSD definition ot tm::tm_zone is a char* (and

[PATCH] libstdc++: Use const_cast to workaround tm_zone being non-const

2025-03-26 Thread Jonathan Wakely
Iain reported that he's seeing this on Darwin: include/bits/chrono_io.h:914: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] This is because the BSD definition ot tm::tm_zone is a char* (and has been since 1987) rather than const char* as in Glibc and POSIX.1-2