(in reply to https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598412.html, adding libstdc++ to CC, with the same patch attached again) To clarify, this is not a fix for a user-facing issue of gcc or a fix for UB. It is just a minor UX improvement for developers that use the clang integer sanitizer to detect implicit int conversions. To reproduce: $ cat 1.cpp #include int main() { const auto a{"-1"}; unsigned b{}; std::from_chars(a, a + 2, b); } $ clang++ -fsanitize=integer -std=c++17 1.cpp -o exe && ./exe /usr/bin/../lib64/gcc/x86_64-s use-linux/12/../../../../include/c++/12/charconv:439:9: runtime error: implicit conversion from type 'int' of value -3 (32-bit, signed) to type 'unsigned char' changed the value to 253 (8-bit, unsigned) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/bin/../lib64/gcc/x86_64-suse-linux/12/../../../../include/c++/12/charconv:439:9 Best, Marco