summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qbytearray.h16
-rw-r--r--tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp2
2 files changed, 1 insertions, 17 deletions
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index 1e2a93d9f0..489f5f2fb3 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -161,22 +161,6 @@ struct QByteArrayDataPtr
}()) \
/**/
-#elif defined(Q_CC_GNU)
-// We need to create a QByteArrayData in the .rodata section of memory
-// and the only way to do that is to create a "static const" variable.
-// To do that, we need the __extension__ {( )} trick which only GCC supports
-
-# define QByteArrayLiteral(str) \
- QByteArray(__extension__ ({ \
- enum { Size = sizeof(str) - 1 }; \
- static const QStaticByteArrayData<Size> qbytearray_literal = { \
- Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER(Size), \
- str }; \
- QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; \
- holder; \
- })) \
- /**/
-
#endif
#ifndef QByteArrayLiteral
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
index 9bb3506133..aa17a499a1 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
@@ -1880,7 +1880,7 @@ void tst_QByteArray::movablity()
void tst_QByteArray::literals()
{
-#if defined(Q_COMPILER_LAMBDA) || defined(Q_CC_GNU)
+#if defined(Q_COMPILER_LAMBDA)
QByteArray str(QByteArrayLiteral("abcd"));
QVERIFY(str.length() == 4);