https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120358
--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> --- https://doc.qt.io/qt-6/qchar.html yes what they mention is totally wrong. I am 99% sure QT code is not alias friendly at all and needs to be fixed and it looks hard to fix as they treat char16_t and QChar as compatible from an aliasing point of view but that is never true in C++. Doing stores via QChar and then loads via char16_t is fine but the opposite is undefined. And then in this case doing comparisons of pointers will cause issues.