https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119141
--- Comment #5 from Nikl Kelbon <kelbonage at gmail dot com> --- (In reply to Sam James from comment #3) > (In reply to Nikl Kelbon from comment #2) > > This is not a bug about the difference in behavior of different compilers. > > Of course they will behave the same, they have the same standard libraries > > and sanitizers. > > No, it's not an "of course" at all. While libsanitizer is shared, the > instrumentation is done in the compiler itself, and even with that aside, > optimisations can affect opportunities for instrumentation. > > As for standard libraries: also no, as Andrew's example shows using > -stdlib=libc++ (rather than libstdc++). https://eel.is/c++draft/time.duration.cons#3 [Note 1: This requirement prevents implicit truncation error when converting between integral-based duration types. Such a construction could easily lead to confusion about the value of the duration. — end note]