Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.3.0 Beta2
-
None
-
3
-
de6a004bc5 (qt/qtbase/dev) de6a004bc5 (qt/tqtc-qtbase/dev) 5711f58410 (qt/qtbase/6.3) 22455bab78 (qt/qtbase/6.2) 22455bab78 (qt/tqtc-qtbase/6.2) 5711f58410 (qt/tqtc-qtbase/6.3)
-
Team A Foundation Sprint 53, Team A Foundation Sprint 54, Team A Foundation Sprint 55
Description
When trying to compile tst_qbytearrayview using GCC 11.2 C++20 -fsanitize=undefined, I get:
tests/auto/corelib/text/qbytearrayview/tst_qbytearrayview.cpp:309:23: error: non-constant condition for static assertion 309 | static_assert(!bv.isNull()); | ^~~~~~~~~~~~ src/corelib/text/qbytearrayview.h:318:67: error: ‘(((const char*)(& hello)) == 0)’ is not a constant expression 318 | [[nodiscard]] constexpr bool isNull() const noexcept { return !data(); } | ^~~~~~~
tst_qstringview_check, otoh, works. It seems QBAV is missing the __builtin_constant_p / std::is_const_evaluated() stuff that QSV has.
Attachments
For Gerrit Dashboard: QTBUG-101307 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
403374,4 | tst_QByteArrayView:: disable failing constexpr checks for GCC | dev | qt/qtbase | Status: MERGED | +2 | 0 |
403902,2 | tst_QByteArrayView:: disable failing constexpr checks for GCC | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |
403903,2 | tst_QByteArrayView:: disable failing constexpr checks for GCC | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |