-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.15.1
-
None
-
-
6e60921290892ac0fcf625c5025845eb0334880e (qt/qtbase/5.15)
Latest GCC 10.2 in latest Qt found reinterpret-cast<> as:
/usr/include/qt/QtCore/qmap.h:212: error: dereferencing type-punned pointer might break strict-aliasing rules [-Werror=strict-aliasing]
/usr/include/qt/QtCore/qmap.h:863:35: required from ‘QMap<K, V>::iterator QMap<K, V>::find(const Key&) [with Key = QString; T = QString]’
../ed_highway/stringsfilecache.cpp:243:42: required from here
/usr/include/qt/QtCore/qmap.h:212:52: error: dereferencing type-punned pointer might break strict-aliasing rules [-Werror=strict-aliasing]
212 | Node *end() \{ return reinterpret_cast<Node *>(&header); }
| ^~~~~~
Declaration as:
QMap<QString, QString> key2filename{}
| For Gerrit Dashboard: QTBUG-88185 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 320431,3 | QMap: suppress warning about strict aliasing violation in end() | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
| 320432,3 | QMap: don't tell everyone QMapNode has no friends | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |