summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearray.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-06-11 16:15:39 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-12 22:57:22 +0200
commit087f279fff143f7db01179b21cf873539319bfdc (patch)
tree2998a6ca63ecf15a56f09c8d17b3953129da84d8 /src/corelib/tools/qbytearray.h
parent08b3aceffe72668f578707c748c8180dbcf570cd (diff)
Don't use gcc extension for QByteArrayLiteral neither
This extension doesn't work for e.g. default arguments in function declarations. Change-Id: I32b7afa6e01b6af55fb2409179b4fd94cb04cd8d Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qbytearray.h')
-rw-r--r--src/corelib/tools/qbytearray.h16
1 files changed, 0 insertions, 16 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