summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-06-15 11:49:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-17 09:44:22 +0200
commitd9fb6e6dbb2b322556d581265da2442e3b91a6a3 (patch)
tree8d5ae465adf4db8468c7e0ff1d91113594cb45aa /src/corelib
parentd9e722d8560c07adb1852cfd061ffb23197d06fd (diff)
Remove use of 'register' from Qt.
It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/arch/qatomic_alpha.h40
-rw-r--r--src/corelib/arch/qatomic_armv5.h16
-rw-r--r--src/corelib/arch/qatomic_armv6.h112
-rw-r--r--src/corelib/arch/qatomic_ia64.h30
-rw-r--r--src/corelib/arch/qatomic_mips.h40
-rw-r--r--src/corelib/arch/qatomic_power.h56
-rw-r--r--src/corelib/arch/qatomic_sh4a.h36
-rw-r--r--src/corelib/codecs/qtextcodec.cpp4
-rw-r--r--src/corelib/global/qlogging.cpp2
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp2
-rw-r--r--src/corelib/io/qurl.cpp8
-rw-r--r--src/corelib/io/qurlidna.cpp8
-rw-r--r--src/corelib/io/qurlrecode.cpp4
-rw-r--r--src/corelib/kernel/qcore_unix.cpp2
-rw-r--r--src/corelib/kernel/qcore_unix_p.h18
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp4
-rw-r--r--src/corelib/kernel/qmetatype.h2
-rw-r--r--src/corelib/kernel/qsystemsemaphore_unix.cpp2
-rw-r--r--src/corelib/kernel/qtimerinfo_unix.cpp20
-rw-r--r--src/corelib/thread/qgenericatomic.h4
-rw-r--r--src/corelib/thread/qmutex.cpp2
-rw-r--r--src/corelib/tools/qbytearray.cpp20
-rw-r--r--src/corelib/tools/qbytearraymatcher.cpp2
-rw-r--r--src/corelib/tools/qlocale_tools.cpp24
-rw-r--r--src/corelib/tools/qlocale_tools_p.h4
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h10
-rw-r--r--src/corelib/tools/qstring.cpp10
-rw-r--r--src/corelib/tools/qstringmatcher.cpp2
28 files changed, 242 insertions, 242 deletions
diff --git a/src/corelib/arch/qatomic_alpha.h b/src/corelib/arch/qatomic_alpha.h
index 71cb112d47..5008a1acda 100644
--- a/src/corelib/arch/qatomic_alpha.h
+++ b/src/corelib/arch/qatomic_alpha.h
@@ -114,7 +114,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
inline bool QBasicAtomicInt::ref()
{
- register int old, tmp;
+ int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"addl %0,1,%1\n" /* tmp=old+1; */
@@ -131,7 +131,7 @@ inline bool QBasicAtomicInt::ref()
inline bool QBasicAtomicInt::deref()
{
- register int old, tmp;
+ int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"subl %0,1,%1\n" /* tmp=old-1; */
@@ -148,7 +148,7 @@ inline bool QBasicAtomicInt::deref()
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
- register int ret;
+ int ret;
asm volatile("1:\n"
"ldl_l %0,%1\n" /* ret=*ptr; */
"cmpeq %0,%2,%0\n"/* if (ret==expected) ret=0; else ret=1; */
@@ -167,7 +167,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
- register int ret;
+ int ret;
asm volatile("1:\n"
"ldl_l %0,%1\n" /* ret=*ptr; */
"cmpeq %0,%2,%0\n"/* if (ret==expected) ret=0; else ret=1; */
@@ -187,7 +187,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
- register int ret;
+ int ret;
asm volatile("mb\n"
"1:\n"
"ldl_l %0,%1\n" /* ret=*ptr; */
@@ -207,7 +207,7 @@ inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
{
- register int old, tmp;
+ int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@@ -224,7 +224,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
{
- register int old, tmp;
+ int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@@ -242,7 +242,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
{
- register int old, tmp;
+ int old, tmp;
asm volatile("mb\n"
"1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
@@ -260,7 +260,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
{
- register int old, tmp;
+ int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"addl %0,%3,%1\n"/* tmp=old+value; */
@@ -277,7 +277,7 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
{
- register int old, tmp;
+ int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"addl %0,%3,%1\n"/* tmp=old+value; */
@@ -295,7 +295,7 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
{
- register int old, tmp;
+ int old, tmp;
asm volatile("mb\n"
"1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
@@ -314,7 +314,7 @@ inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
- register void *ret;
+ void *ret;
asm volatile("1:\n"
"ldq_l %0,%1\n" /* ret=*ptr; */
"cmpeq %0,%2,%0\n"/* if (ret==expected) tmp=0; else tmp=1; */
@@ -334,7 +334,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
{
- register void *ret;
+ void *ret;
asm volatile("1:\n"
"ldq_l %0,%1\n" /* ret=*ptr; */
"cmpeq %0,%2,%0\n"/* if (ret==expected) tmp=0; else tmp=1; */
@@ -355,7 +355,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
{
- register void *ret;
+ void *ret;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%1\n" /* ret=*ptr; */
@@ -376,7 +376,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
- register T *old, *tmp;
+ T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@@ -394,7 +394,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
- register T *old, *tmp;
+ T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@@ -413,7 +413,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
{
- register T *old, *tmp;
+ T *old, *tmp;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
@@ -432,7 +432,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
- register T *old, *tmp;
+ T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"addq %0,%3,%1\n"/* tmp=old+value; */
@@ -450,7 +450,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
{
- register T *old, *tmp;
+ T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"addq %0,%3,%1\n"/* tmp=old+value; */
@@ -469,7 +469,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
{
- register T *old, *tmp;
+ T *old, *tmp;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
diff --git a/src/corelib/arch/qatomic_armv5.h b/src/corelib/arch/qatomic_armv5.h
index e0a50b3c24..b583ec662c 100644
--- a/src/corelib/arch/qatomic_armv5.h
+++ b/src/corelib/arch/qatomic_armv5.h
@@ -114,8 +114,8 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
template<> template<typename T> inline
bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
+ T originalValue;
+ T newValue;
do {
originalValue = _q_value;
newValue = originalValue + 1;
@@ -126,8 +126,8 @@ bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
+ T originalValue;
+ T newValue;
do {
originalValue = _q_value;
newValue = originalValue - 1;
@@ -138,7 +138,7 @@ bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
- register T originalValue;
+ T originalValue;
do {
originalValue = _q_value;
if (originalValue != expectedValue)
@@ -165,7 +165,7 @@ template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
#if defined(__thumb__)
- register T originalValue;
+ T originalValue;
do {
originalValue = _q_value;
} while (_q_cmpxchg(originalValue, newValue, &_q_value) != 0);
@@ -184,8 +184,8 @@ T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
+ T originalValue;
+ T newValue;
do {
originalValue = _q_value;
newValue = originalValue + valueToAdd;
diff --git a/src/corelib/arch/qatomic_armv6.h b/src/corelib/arch/qatomic_armv6.h
index 7f5939e391..08b2b02133 100644
--- a/src/corelib/arch/qatomic_armv6.h
+++ b/src/corelib/arch/qatomic_armv6.h
@@ -117,8 +117,8 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
template<> template<typename T> inline
bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
{
- register T newValue;
- register int result;
+ T newValue;
+ int result;
asm volatile("0:\n"
"ldrex %[newValue], [%[_q_value]]\n"
"add %[newValue], %[newValue], #1\n"
@@ -136,8 +136,8 @@ bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
{
- register T newValue;
- register int result;
+ T newValue;
+ int result;
asm volatile("0:\n"
"ldrex %[newValue], [%[_q_value]]\n"
"sub %[newValue], %[newValue], #1\n"
@@ -155,7 +155,7 @@ bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
- register int result;
+ int result;
asm volatile("0:\n"
"ldrex %[result], [%[_q_value]]\n"
"eors %[result], %[result], %[expectedValue]\n"
@@ -175,8 +175,8 @@ bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
- register T originalValue;
- register int result;
+ T originalValue;
+ int result;
asm volatile("0:\n"
"ldrex %[originalValue], [%[_q_value]]\n"
"strex %[result], %[newValue], [%[_q_value]]\n"
@@ -194,9 +194,9 @@ T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
- register int result;
+ T originalValue;
+ T newValue;
+ int result;
asm volatile("0:\n"
"ldrex %[originalValue], [%[_q_value]]\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
@@ -256,8 +256,8 @@ template<> struct QAtomicIntegerTraits<char32_t> { enum { IsInteger = 1 }; };
template<> template<typename T> inline
bool QBasicAtomicOps<1>::ref(T &_q_value) Q_DECL_NOTHROW
{
- register T newValue;
- register int result;
+ T newValue;
+ int result;
asm volatile("0:\n"
"ldrexb %[newValue], [%[_q_value]]\n"
"add %[newValue], %[newValue], #1\n"
@@ -275,8 +275,8 @@ bool QBasicAtomicOps<1>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<1>::deref(T &_q_value) Q_DECL_NOTHROW
{
- register T newValue;
- register int result;
+ T newValue;
+ int result;
asm volatile("0:\n"
"ldrexb %[newValue], [%[_q_value]]\n"
"sub %[newValue], %[newValue], #1\n"
@@ -294,7 +294,7 @@ bool QBasicAtomicOps<1>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<1>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
- register T result;
+ T result;
asm volatile("0:\n"
"ldrexb %[result], [%[_q_value]]\n"
"eors %[result], %[result], %[expectedValue]\n"
@@ -314,8 +314,8 @@ bool QBasicAtomicOps<1>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
template<> template <typename T> inline
T QBasicAtomicOps<1>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
- register T originalValue;
- register int result;
+ T originalValue;
+ int result;
asm volatile("0:\n"
"ldrexb %[originalValue], [%[_q_value]]\n"
"strexb %[result], %[newValue], [%[_q_value]]\n"
@@ -333,9 +333,9 @@ T QBasicAtomicOps<1>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<1>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
- register int result;
+ T originalValue;
+ T newValue;
+ int result;
asm volatile("0:\n"
"ldrexb %[originalValue], [%[_q_value]]\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
@@ -355,8 +355,8 @@ T QBasicAtomicOps<1>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy
template<> template<typename T> inline
bool QBasicAtomicOps<2>::ref(T &_q_value) Q_DECL_NOTHROW
{
- register T newValue;
- register int result;
+ T newValue;
+ int result;
asm volatile("0:\n"
"ldrexh %[newValue], [%[_q_value]]\n"
"add %[newValue], %[newValue], #1\n"
@@ -374,8 +374,8 @@ bool QBasicAtomicOps<2>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<2>::deref(T &_q_value) Q_DECL_NOTHROW
{
- register T newValue;
- register int result;
+ T newValue;
+ int result;
asm volatile("0:\n"
"ldrexh %[newValue], [%[_q_value]]\n"
"sub %[newValue], %[newValue], #1\n"
@@ -393,7 +393,7 @@ bool QBasicAtomicOps<2>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<2>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
- register T result;
+ T result;
asm volatile("0:\n"
"ldrexh %[result], [%[_q_value]]\n"
"eors %[result], %[result], %[expectedValue]\n"
@@ -413,8 +413,8 @@ bool QBasicAtomicOps<2>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
template<> template <typename T> inline
T QBasicAtomicOps<2>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
- register T originalValue;
- register int result;
+ T originalValue;
+ int result;
asm volatile("0:\n"
"ldrexh %[originalValue], [%[_q_value]]\n"
"strexh %[result], %[newValue], [%[_q_value]]\n"
@@ -432,9 +432,9 @@ T QBasicAtomicOps<2>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<2>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
- register int result;
+ T originalValue;
+ T newValue;
+ int result;
asm volatile("0:\n"
"ldrexh %[originalValue], [%[_q_value]]\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
@@ -462,8 +462,8 @@ T QBasicAtomicOps<2>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy
template<> template<typename T> inline
bool QBasicAtomicOps<8>::ref(T &_q_value) Q_DECL_NOTHROW
{
- register T newValue;
- register int result;
+ T newValue;
+ int result;
asm volatile("0:\n"
"ldrexd %[newValue], %H[newValue], [%[_q_value]]\n"
"adds %Q[newValue], %Q[newValue], #1\n"
@@ -482,8 +482,8 @@ bool QBasicAtomicOps<8>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<8>::deref(T &_q_value) Q_DECL_NOTHROW
{
- register T newValue;
- register int result;
+ T newValue;
+ int result;
asm volatile("0:\n"
"ldrexd %[newValue], %H[newValue], [%[_q_value]]\n"
"subs %Q[newValue], %Q[newValue], #1\n"
@@ -502,7 +502,7 @@ bool QBasicAtomicOps<8>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
- register T result;
+ T result;
asm volatile("0:\n"
"ldrexd %[result], %H[result], [%[_q_value]]\n"
"eor %[result], %[result], %[expectedValue]\n"
@@ -524,8 +524,8 @@ bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
template<> template <typename T> inline
T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
- register T originalValue;
- register int result;
+ T originalValue;
+ int result;
asm volatile("0:\n"
"ldrexd %[originalValue], %H[originalValue], [%[_q_value]]\n"
"strexd %[result], %[newValue], %H[newValue], [%[_q_value]]\n"
@@ -543,9 +543,9 @@ T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
- register int result;
+ T originalValue;
+ T newValue;
+ int result;
asm volatile("0:\n"
"ldrexd %[originalValue], %H[originalValue], [%[_q_value]]\n"
"adds %Q[newValue], %Q[originalValue], %Q[valueToAdd]\n"
@@ -588,8 +588,8 @@ T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy
inline bool QBasicAtomicInt::ref() Q_DECL_NOTHROW
{
- register int newValue;
- register int result;
+ int newValue;
+ int result;
retry:
__asm {
ldrex newValue, [&_q_value]
@@ -603,8 +603,8 @@ inline bool QBasicAtomicInt::ref() Q_DECL_NOTHROW
inline bool QBasicAtomicInt::deref() Q_DECL_NOTHROW
{
- register int newValue;
- register int result;
+ int newValue;
+ int result;
retry:
__asm {
ldrex newValue, [&_q_value]
@@ -618,7 +618,7 @@ inline bool QBasicAtomicInt::deref() Q_DECL_NOTHROW
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) Q_DECL_NOTHROW
{
- register int result;
+ int result;
retry:
__asm {
ldrex result, [&_q_value]
@@ -632,8 +632,8 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) Q_DECL_NOTHROW
{
- register int originalValue;
- register int result;
+ int originalValue;
+ int result;
retry:
__asm {
ldrex originalValue, [&_q_value]
@@ -646,9 +646,9 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) Q_DECL_NOTHROW
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) Q_DECL_NOTHROW
{
- register int originalValue;
- register int newValue;
- register int result;
+ int originalValue;
+ int newValue;
+ int result;
retry:
__asm {
ldrex originalValue, [&_q_value]
@@ -663,7 +663,7 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) Q_DECL_NOTHROW
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue) Q_DECL_NOTHROW
{
- register T *result;
+ T *result;
retry:
__asm {
ldrex result, [&_q_value]
@@ -678,8 +678,8 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) Q_DECL_NOTHROW
{
- register T *originalValue;
- register int result;
+ T *originalValue;
+ int result;
retry:
__asm {
ldrex originalValue, [&_q_value]
@@ -693,9 +693,9 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) Q
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd) Q_DECL_NOTHROW
{
- register T *originalValue;
- register T *newValue;
- register int result;
+ T *originalValue;
+ T *newValue;
+ int result;
retry:
__asm {
ldrex originalValue, [&_q_value]
diff --git a/src/corelib/arch/qatomic_ia64.h b/src/corelib/arch/qatomic_ia64.h
index ed72036076..98937c7551 100644
--- a/src/corelib/arch/qatomic_ia64.h
+++ b/src/corelib/arch/qatomic_ia64.h
@@ -192,7 +192,7 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
typedef T Type;
};
-inline bool _q_ia64_fetchadd_immediate(register int value)
+inline bool _q_ia64_fetchadd_immediate(int value)
{
return value == 1 || value == -1
|| value == 4 || value == -4
@@ -218,7 +218,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
- register int expectedValueCopy = expectedValue;
+ int expectedValueCopy = expectedValue;
return (static_cast<int>(_InterlockedCompareExchange(&_q_value,
newValue,
expectedValueCopy))
@@ -227,7 +227,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
- register int expectedValueCopy = expectedValue;
+ int expectedValueCopy = expectedValue;
return (static_cast<int>(_InterlockedCompareExchange_acq(reinterpret_cast<volatile uint *>(&_q_value),
newValue,
expectedValueCopy))
@@ -236,7 +236,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
- register int expectedValueCopy = expectedValue;
+ int expectedValueCopy = expectedValue;
return (static_cast<int>(_InterlockedCompareExchange_rel(reinterpret_cast<volatile uint *>(&_q_value),
newValue,
expectedValueCopy))
@@ -285,7 +285,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
- register T *expectedValueCopy = expectedValue;
+ T *expectedValueCopy = expectedValue;
return (_InterlockedCompareExchangePointer(reinterpret_cast<void * volatile*>(&_q_value),
newValue,
expectedValueCopy)
@@ -300,7 +300,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
volatile unsigned long *p;
};
x = &_q_value;
- register T *expectedValueCopy = expectedValue;
+ T *expectedValueCopy = expectedValue;
return (_InterlockedCompareExchange64_acq(p, quintptr(newValue), quintptr(expectedValueCopy))
== quintptr(expectedValue));
}
@@ -313,7 +313,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
volatile unsigned long *p;
};
x = &_q_value;
- register T *expectedValueCopy = expectedValue;
+ T *expectedValueCopy = expectedValue;
return (_InterlockedCompareExchange64_rel(p, quintptr(newValue), quintptr(expectedValueCopy))
== quintptr(expectedValue));
}
@@ -912,7 +912,7 @@ T QBasicAtomicOps<1>::fetchAndAddAcquire(T &_q_value, typename QAtomicAdditiveTy
{
valueToAdd *= QAtomicAdditiveType<T>::AddScale;
// implement the test-and-set loop
- register T old, ret;
+ T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint8)old, FENCE);
@@ -926,7 +926,7 @@ template<> template <typename T> inline
T QBasicAtomicOps<1>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
// implement the test-and-set loop
- register T old, ret;
+ T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint8)old, FENCE);
@@ -941,7 +941,7 @@ T QBasicAtomicOps<2>::fetchAndAddAcquire(T &_q_value, typename QAtomicAdditiveTy
{
valueToAdd *= QAtomicAdditiveType<T>::AddScale;
// implement the test-and-set loop
- register T old, ret;
+ T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint16)old, FENCE);
@@ -955,7 +955,7 @@ template<> template <typename T> inline
T QBasicAtomicOps<2>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
// implement the test-and-set loop
- register T old, ret;
+ T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint16)old, FENCE);
@@ -970,7 +970,7 @@ T QBasicAtomicOps<4>::fetchAndAddAcquire(T &_q_value, typename QAtomicAdditiveTy
{
valueToAdd *= QAtomicAdditiveType<T>::AddScale;
// implement the test-and-set loop
- register T old, ret;
+ T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (unsigned)old, FENCE);
@@ -984,7 +984,7 @@ template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
// implement the test-and-set loop
- register T old, ret;
+ T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (unsigned)old, FENCE);
@@ -999,7 +999,7 @@ T QBasicAtomicOps<8>::fetchAndAddAcquire(T &_q_value, typename QAtomicAdditiveTy
{
valueToAdd *= QAtomicAdditiveType<T>::AddScale;
// implement the test-and-set loop
- register T old, ret;
+ T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint64)old, FENCE);
@@ -1013,7 +1013,7 @@ template<> template <typename T> inline
T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
// implement the test-and-set loop
- register T old, ret;
+ T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint64)old, FENCE);
diff --git a/src/corelib/arch/qatomic_mips.h b/src/corelib/arch/qatomic_mips.h
index 7716750332..6eb9613e31 100644
--- a/src/corelib/arch/qatomic_mips.h
+++ b/src/corelib/arch/qatomic_mips.h
@@ -137,8 +137,8 @@ void QBasicAtomicOps<size>::orderedMemoryFence(const T &) Q_DECL_NOTHROW
template<> template<typename T> inline
bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
+ T originalValue;
+ T newValue;
asm volatile("0:\n"
"ll %[originalValue], %[_q_value]\n"
"addiu %[newValue], %[originalValue], %[one]\n"
@@ -156,8 +156,8 @@ bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template<typename T> inline
bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
+ T originalValue;
+ T newValue;
asm volatile("0:\n"
"ll %[originalValue], %[_q_value]\n"
"addiu %[newValue], %[originalValue], %[minusOne]\n"
@@ -175,8 +175,8 @@ bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
- register T result;
- register T tempValue;
+ T result;
+ T tempValue;
asm volatile("0:\n"
"ll %[result], %[_q_value]\n"
"xor %[result], %[result], %[expectedValue]\n"
@@ -199,8 +199,8 @@ bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
- register T originalValue;
- register T tempValue;
+ T originalValue;
+ T tempValue;
asm volatile("0:\n"
"ll %[originalValue], %[_q_value]\n"
"move %[tempValue], %[newValue]\n"
@@ -218,8 +218,8 @@ T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
+ T originalValue;
+ T newValue;
asm volatile("0:\n"
"ll %[originalValue], %[_q_value]\n"
"addu %[newValue], %[originalValue], %[valueToAdd]\n"
@@ -254,8 +254,8 @@ template<> struct QAtomicIntegerTraits<char32_t> { enum { IsInteger = 1 }; };
template<> template<typename T> inline
bool QBasicAtomicOps<8>::ref(T &_q_value) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
+ T originalValue;
+ T newValue;
asm volatile("0:\n"
"lld %[originalValue], %[_q_value]\n"
"addiu %[newValue], %[originalValue], %[one]\n"
@@ -273,8 +273,8 @@ bool QBasicAtomicOps<8>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template<typename T> inline
bool QBasicAtomicOps<8>::deref(T &_q_value) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
+ T originalValue;
+ T newValue;
asm volatile("0:\n"
"lld %[originalValue], %[_q_value]\n"
"addiu %[newValue], %[originalValue], %[minusOne]\n"
@@ -292,8 +292,8 @@ bool QBasicAtomicOps<8>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
- register T result;
- register T tempValue;
+ T result;
+ T tempValue;
asm volatile("0:\n"
"lld %[result], %[_q_value]\n"
"xor %[result], %[result], %[expectedValue]\n"
@@ -316,8 +316,8 @@ bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
template<> template <typename T> inline
T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
- register T originalValue;
- register T tempValue;
+ T originalValue;
+ T tempValue;
asm volatile("0:\n"
"lld %[originalValue], %[_q_value]\n"
"move %[tempValue], %[newValue]\n"
@@ -335,8 +335,8 @@ T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
- register T originalValue;
- register T newValue;
+ T originalValue;
+ T newValue;
asm volatile("0:\n"
"lld %[originalValue], %[_q_value]\n"
"addu %[newValue], %[originalValue], %[valueToAdd]\n"
diff --git a/src/corelib/arch/qatomic_power.h b/src/corelib/arch/qatomic_power.h
index ad1c619d56..3ddd303795 100644
--- a/src/corelib/arch/qatomic_power.h
+++ b/src/corelib/arch/qatomic_power.h
@@ -124,8 +124,8 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
inline bool QBasicAtomicInt::ref()
{
- register int originalValue;
- register int newValue;
+ int originalValue;
+ int newValue;
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
"addi %[newValue], %[originalValue], %[one]\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
@@ -141,8 +141,8 @@ inline bool QBasicAtomicInt::ref()
inline bool QBasicAtomicInt::deref()
{
- register int originalValue;
- register int newValue;
+ int originalValue;
+ int newValue;
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
"addi %[newValue], %[originalValue], %[minusOne]\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
@@ -158,7 +158,7 @@ inline bool QBasicAtomicInt::deref()
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
- register int result;
+ int result;
asm volatile("lwarx %[result]," _Q_VALUE "\n"
"xor. %[result], %[result], %[expectedValue]\n"
"bne $+12\n"
@@ -175,7 +175,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
- register int result;
+ int result;
asm volatile("lwarx %[result]," _Q_VALUE "\n"
"xor. %[result], %[result], %[expectedValue]\n"
"bne $+16\n"
@@ -193,7 +193,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
- register int result;
+ int result;
asm volatile("eieio\n"
"lwarx %[result]," _Q_VALUE "\n"
"xor. %[result], %[result], %[expectedValue]\n"
@@ -211,7 +211,7 @@ inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
{
- register int originalValue;
+ int originalValue;
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
"bne- $-8\n"
@@ -225,7 +225,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
{
- register int originalValue;
+ int originalValue;
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
"bne- $-8\n"
@@ -240,7 +240,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
{
- register int originalValue;
+ int originalValue;
asm volatile("eieio\n"
"lwarx %[originalValue]," _Q_VALUE "\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
@@ -255,8 +255,8 @@ inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
{
- register int originalValue;
- register int newValue;
+ int originalValue;
+ int newValue;
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
@@ -272,8 +272,8 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
{
- register int originalValue;
- register int newValue;
+ int originalValue;
+ int newValue;
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
@@ -290,8 +290,8 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
{
- register int originalValue;
- register int newValue;
+ int originalValue;
+ int newValue;
asm volatile("eieio\n"
"lwarx %[originalValue]," _Q_VALUE "\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
@@ -317,7 +317,7 @@ inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
- register void *result;
+ void *result;
asm volatile(LPARX" %[result]," _Q_VALUE "\n"
"xor. %[result], %[result], %[expectedValue]\n"
"bne $+12\n"
@@ -335,7 +335,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
{
- register void *result;
+ void *result;
asm volatile(LPARX" %[result]," _Q_VALUE "\n"
"xor. %[result], %[result], %[expectedValue]\n"
"bne $+16\n"
@@ -354,7 +354,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
{
- register void *result;
+ void *result;
asm volatile("eieio\n"
LPARX" %[result]," _Q_VALUE "\n"
"xor. %[result], %[result], %[expectedValue]\n"
@@ -373,7 +373,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
- register T *originalValue;
+ T *originalValue;
asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
STPCX" %[newValue]," _Q_VALUE "\n"
"bne- $-8\n"
@@ -388,7 +388,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
- register T *originalValue;
+ T *originalValue;
asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
STPCX" %[newValue]," _Q_VALUE "\n"
"bne- $-8\n"
@@ -404,7 +404,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("eieio\n"
LPARX" %[originalValue]," _Q_VALUE "\n"
STPCX" %[newValue]," _Q_VALUE "\n"
@@ -420,8 +420,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
- register T *originalValue;
- register T *newValue;
+ T *originalValue;
+ T *newValue;
asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
STPCX" %[newValue]," _Q_VALUE "\n"
@@ -438,8 +438,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
{
- register T *originalValue;
- register T *newValue;
+ T *originalValue;
+ T *newValue;
asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
STPCX" %[newValue]," _Q_VALUE "\n"
@@ -457,8 +457,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
{
- register T *originalValue;
- register T *newValue;
+ T *originalValue;
+ T *newValue;
asm volatile("eieio\n"
LPARX" %[originalValue]," _Q_VALUE "\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
diff --git a/src/corelib/arch/qatomic_sh4a.h b/src/corelib/arch/qatomic_sh4a.h
index 08f75e44f2..6e59279f3e 100644
--- a/src/corelib/arch/qatomic_sh4a.h
+++ b/src/corelib/arch/qatomic_sh4a.h
@@ -147,7 +147,7 @@ inline bool QBasicAtomicInt::deref()
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
- register int result;
+ int result;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"xor %[expectedValue], r0\n"
@@ -169,7 +169,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
- register int result;
+ int result;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"xor %[expectedValue], r0\n"
@@ -192,7 +192,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
- register int result;
+ int result;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@@ -220,7 +220,7 @@ inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
{
- register int originalValue;
+ int originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -237,7 +237,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
{
- register int originalValue;
+ int originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -255,7 +255,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
{
- register int originalValue;
+ int originalValue;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@@ -278,7 +278,7 @@ inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
{
- register int originalValue;
+ int originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -295,7 +295,7 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
{
- register int originalValue;
+ int originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -313,7 +313,7 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
{
- register int originalValue;
+ int originalValue;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@@ -337,7 +337,7 @@ inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
- register T *result;
+ T *result;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"xor %[expectedValue], r0\n"
@@ -360,7 +360,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
{
- register T *result;
+ T *result;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"xor %[expectedValue], r0\n"
@@ -384,7 +384,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
{
- register T *result;
+ T *result;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@@ -414,7 +414,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -432,7 +432,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -451,7 +451,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@@ -476,7 +476,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -494,7 +494,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -513,7 +513,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 1cedd3a28d..4ed7b00e53 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -99,9 +99,9 @@ Q_GLOBAL_STATIC_WITH_ARGS(QMutex, textCodecsMutex, (QMutex::Recursive));
QMutex *qTextCodecsMutex() { return textCodecsMutex(); }
#if !defined(QT_USE_ICU)
-static char qtolower(register char c)
+static char qtolower(char c)
{ if (c >= 'A' && c <= 'Z') return c + 0x20; return c; }
-static bool qisalnum(register char c)
+static bool qisalnum(char c)
{ return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); }
bool qTextCodecNameMatch(const char *n, const char *h)
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index c8293beb4e..85ff89ebdd 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -501,7 +501,7 @@ Q_AUTOTEST_EXPORT QByteArray qCleanupFuncinfo(QByteArray info)
templatecount = 1;
--pos;
while (pos && templatecount) {
- register char c = info.at(pos);
+ char c = info.at(pos);
if (c == '>')
++templatecount;
else if (c == '<')
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index 18f3404c5d..024af79c33 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -220,7 +220,7 @@ QT_BEGIN_NAMESPACE
QInotifyFileSystemWatcherEngine *QInotifyFileSystemWatcherEngine::create(QObject *parent)
{
- register int fd = -1;
+ int fd = -1;
#ifdef IN_CLOEXEC
fd = inotify_init1(IN_CLOEXEC);
#endif
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 02e7b967ea..f2e1f9bbc7 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -882,7 +882,7 @@ inline bool QUrlPrivate::setScheme(const QString &value, int len, bool doSetErro
// schemes are ASCII only, so we don't need the full Unicode toLower
QChar *schemeData = scheme.data(); // force detaching here
for (int i = needsLowercasing; i >= 0; --i) {
- register ushort c = schemeData[i].unicode();
+ ushort c = schemeData[i].unicode();
if (c >= 'A' && c <= 'Z')
schemeData[i] = c + 0x20;
}
@@ -1244,7 +1244,7 @@ inline void QUrlPrivate::parse(const QString &url, QUrl::ParsingMode parsingMode
const ushort *const data = reinterpret_cast<const ushort *>(begin);
for (int i = 0; i < len; ++i) {
- register uint uc = data[i];
+ uint uc = data[i];
if (uc == '#' && hash == -1) {
hash = i;
@@ -1472,7 +1472,7 @@ inline QUrlPrivate::ErrorCode QUrlPrivate::validityError(QString *source, int *p
// check for a path of "text:text/"
for (int i = 0; i < path.length(); ++i) {
- register ushort c = path.at(i).unicode();
+ ushort c = path.at(i).unicode();
if (c == '/') {
// found the slash before the colon
return NoError;
@@ -1512,7 +1512,7 @@ bool QUrlPrivate::validateComponent(QUrlPrivate::Section section, const QString
const ushort *const data = reinterpret_cast<const ushort *>(input.constData());
for (uint i = uint(begin); i < uint(end); ++i) {
- register uint uc = data[i];
+ uint uc = data[i];
if (uc >= 0x80)
continue;
diff --git a/src/corelib/io/qurlidna.cpp b/src/corelib/io/qurlidna.cpp
index 5fa4b5f7a1..70db9e09eb 100644
--- a/src/corelib/io/qurlidna.cpp
+++ b/src/corelib/io/qurlidna.cpp
@@ -2028,7 +2028,7 @@ Q_AUTOTEST_EXPORT void qt_nameprep(QString *source, int from)
const QChar *e = src + source->size();
for ( ; out < e; ++out) {
- register ushort uc = out->unicode();
+ ushort uc = out->unicode();
if (uc >= 0x80) {
break;
} else if (uc >= 'A' && uc <= 'Z') {
@@ -2121,7 +2121,7 @@ Q_AUTOTEST_EXPORT bool qt_check_std3rules(const QChar *uc, int len)
return false;
for (int i = 0; i < len; ++i) {
- register ushort c = uc[i].unicode();
+ ushort c = uc[i].unicode();
if (c == '-' && (i == 0 || i == len - 1))
return false;
@@ -2504,7 +2504,7 @@ QString qt_ACE_do(const QString &domain, AceOperation op)
const QChar *in = domain.constData() + lastIdx;
const QChar *e = in + labelLength;
for (; in < e; ++in, ++out) {
- register ushort uc = in->unicode();
+ ushort uc = in->unicode();
if (uc > 0x7f)
simple = false;
if (uc >= 'A' && uc <= 'Z')
@@ -2533,7 +2533,7 @@ QString qt_ACE_do(const QString &domain, AceOperation op)
// That means we need one or two temporaries
qt_nameprep(&result, prevLen);
labelLength = result.length() - prevLen;
- register int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
+ int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
aceForm.resize(0);
if (toReserve > aceForm.capacity())
aceForm.reserve(toReserve);
diff --git a/src/corelib/io/qurlrecode.cpp b/src/corelib/io/qurlrecode.cpp
index 6e01272831..5ff0c40a4f 100644
--- a/src/corelib/io/qurlrecode.cpp
+++ b/src/corelib/io/qurlrecode.cpp
@@ -464,7 +464,7 @@ static int recode(QString &result, const ushort *begin, const ushort *end, QUrl:
ushort *output = 0;
for ( ; input != end; ++input) {
- register ushort c;
+ ushort c;
EncodingAction action;
// try a run where no change is necessary
@@ -483,7 +483,7 @@ static int recode(QString &result, const ushort *begin, const ushort *end, QUrl:
break;
non_trivial:
- register uint decoded;
+ uint decoded;
if (c == '%' && retryBadEncoding) {
// always write "%25"
ensureDetached(result, output, begin, input, end);
diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp
index 241658acb1..98e697eb57 100644
--- a/src/corelib/kernel/qcore_unix.cpp
+++ b/src/corelib/kernel/qcore_unix.cpp
@@ -79,7 +79,7 @@ int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
{
if (!orig_timeout) {
// no timeout -> block forever
- register int ret;
+ int ret;
EINTR_LOOP(ret, select(nfds, fdread, fdwrite, fdexcept, 0));
return ret;
}
diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h
index b68146cd6c..8c0589fdc6 100644
--- a/src/corelib/kernel/qcore_unix_p.h
+++ b/src/corelib/kernel/qcore_unix_p.h
@@ -168,7 +168,7 @@ static inline int qt_safe_open(const char *pathname, int flags, mode_t mode = 07
#ifdef O_CLOEXEC
flags |= O_CLOEXEC;
#endif
- register int fd;
+ int fd;
EINTR_LOOP(fd, QT_OPEN(pathname, flags, mode));
// unknown flags are ignored, so we have no way of verifying if
@@ -191,7 +191,7 @@ static inline int qt_safe_pipe(int pipefd[2], int flags = 0)
Q_ASSERT((flags & ~O_NONBLOCK) == 0);
#endif
- register int ret;
+ int ret;
#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC && defined(O_CLOEXEC)
// use pipe2
flags |= O_CLOEXEC;
@@ -223,7 +223,7 @@ static inline int qt_safe_dup(int oldfd, int atleast = 0, int flags = FD_CLOEXEC
{
Q_ASSERT(flags == FD_CLOEXEC || flags == 0);
- register int ret;
+ int ret;
#ifdef F_DUPFD_CLOEXEC
// use this fcntl
if (flags & FD_CLOEXEC) {
@@ -247,7 +247,7 @@ static inline int qt_safe_dup2(int oldfd, int newfd, int flags = FD_CLOEXEC)
{
Q_ASSERT(flags == FD_CLOEXEC || flags == 0);
- register int ret;
+ int ret;
#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC && defined(O_CLOEXEC)
// use dup3
if (flags & FD_CLOEXEC) {
@@ -291,7 +291,7 @@ static inline qint64 qt_safe_write_nosignal(int fd, const void *data, qint64 len
static inline int qt_safe_close(int fd)
{
- register int ret;
+ int ret;
EINTR_LOOP(ret, QT_CLOSE(fd));
return ret;
}
@@ -303,28 +303,28 @@ static inline int qt_safe_close(int fd)
static inline int qt_safe_execve(const char *filename, char *const argv[],
char *const envp[])
{
- register int ret;
+ int ret;
EINTR_LOOP(ret, ::execve(filename, argv, envp));
return ret;
}
static inline int qt_safe_execv(const char *path, char *const argv[])
{
- register int ret;
+ int ret;
EINTR_LOOP(ret, ::execv(path, argv));
return ret;
}
static inline int qt_safe_execvp(const char *file, char *const argv[])
{
- register int ret;
+ int ret;
EINTR_LOOP(ret, ::execvp(file, argv));
return ret;
}
static inline pid_t qt_safe_waitpid(pid_t pid, int *status, int options)
{
- register int ret;
+ int ret;
EINTR_LOOP(ret, ::waitpid(pid, status, options));
return ret;
}
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 100e014e99..e49d5f961c 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -938,7 +938,7 @@ bool QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject *receiv
if (receiver->d_func()->threadData == this->threadData && extraData) {
// application event filters are only called for objects in the GUI thread
for (int i = 0; i < extraData->eventFilters.size(); ++i) {
- register QObject *obj = extraData->eventFilters.at(i);
+ QObject *obj = extraData->eventFilters.at(i);
if (!obj)
continue;
if (obj->d_func()->threadData != threadData) {
@@ -957,7 +957,7 @@ bool QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject *receiver, Q
Q_Q(QCoreApplication);
if (receiver != q && receiver->d_func()->extraData) {
for (int i = 0; i < receiver->d_func()->extraData->eventFilters.size(); ++i) {
- register QObject *obj = receiver->d_func()->extraData->eventFilters.at(i);
+ QObject *obj = receiver->d_func()->extraData->eventFilters.at(i);
if (!obj)
continue;
if (obj->d_func()->threadData != receiver->d_func()->threadData) {
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 7413ef4d89..d9b286e691 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -686,7 +686,7 @@ struct QMetaTypeIdQObject<T*, /* isPointerToTypeDerivedFromQObject */ true>
template <typename T>
inline int qRegisterMetaTypeStreamOperators()
{
- register int id = qMetaTypeId<T>();
+ int id = qMetaTypeId<T>();
QMetaType::registerStreamOperators(id, QtMetaTypePrivate::QMetaTypeFunctionHelper<T>::Save,
QtMetaTypePrivate::QMetaTypeFunctionHelper<T>::Load);
return id;
diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp
index 6e2838a8a5..073bd020ba 100644
--- a/src/corelib/kernel/qsystemsemaphore_unix.cpp
+++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp
@@ -212,7 +212,7 @@ bool QSystemSemaphorePrivate::modifySemaphore(int count)
operation.sem_op = count;
operation.sem_flg = SEM_UNDO;
- register int res;
+ int res;
EINTR_LOOP(res, semop(semaphore, &operation, 1));
if (-1 == res) {
// If the semaphore was removed be nice and create it and then modifySemaphore again
diff --git a/src/corelib/kernel/qtimerinfo_unix.cpp b/src/corelib/kernel/qtimerinfo_unix.cpp
index 0e33fa697a..f1bbbe5338 100644
--- a/src/corelib/kernel/qtimerinfo_unix.cpp
+++ b/src/corelib/kernel/qtimerinfo_unix.cpp
@@ -153,7 +153,7 @@ void QTimerInfoList::timerRepair(const timespec &diff)
{
// repair all timers
for (int i = 0; i < size(); ++i) {
- register QTimerInfo *t = at(i);
+ QTimerInfo *t = at(i);
t->timeout = t->timeout + diff;
}
}
@@ -182,7 +182,7 @@ void QTimerInfoList::timerInsert(QTimerInfo *ti)
{
int index = size();
while (index--) {
- register const QTimerInfo * const t = at(index);
+ const QTimerInfo * const t = at(index);
if (!(ti->timeout < t->timeout))
break;
}
@@ -244,8 +244,8 @@ static void calculateCoarseTimerTimeout(QTimerInfo *t, timespec currentTime)
//
// The objective is to make most timers wake up at the same time, thereby reducing CPU wakeups.
- register uint interval = uint(t->interval);
- register uint msec = uint(t->timeout.tv_nsec) / 1000 / 1000;
+ uint interval = uint(t->interval);
+ uint msec = uint(t->timeout.tv_nsec) / 1000 / 1000;
Q_ASSERT(interval >= 20);
// Calculate how much we can round and still keep within 5% error
@@ -256,14 +256,14 @@ static void calculateCoarseTimerTimeout(QTimerInfo *t, timespec currentTime)
if (interval < 50) {
// round to even
// round towards multiples of 50 ms
- register bool roundUp = (msec % 50) >= 25;
+ bool roundUp = (msec % 50) >= 25;
msec >>= 1;
msec |= uint(roundUp);
msec <<= 1;
} else {
// round to multiple of 4
// round towards multiples of 100 ms
- register bool roundUp = (msec % 100) >= 50;
+ bool roundUp = (msec % 100) >= 50;
msec >>= 2;
msec |= uint(roundUp);
msec <<= 2;
@@ -423,7 +423,7 @@ int QTimerInfoList::timerRemainingTime(int timerId)
timespec tm = {0, 0};
for (int i = 0; i < count(); ++i) {
- register QTimerInfo *t = at(i);
+ QTimerInfo *t = at(i);
if (t->id == timerId) {
if (currentTime < t->timeout) {
// time to wait
@@ -509,7 +509,7 @@ bool QTimerInfoList::unregisterTimer(int timerId)
{
// set timer inactive
for (int i = 0; i < count(); ++i) {
- register QTimerInfo *t = at(i);
+ QTimerInfo *t = at(i);
if (t->id == timerId) {
// found it
removeAt(i);
@@ -530,7 +530,7 @@ bool QTimerInfoList::unregisterTimers(QObject *object)
if (isEmpty())
return false;
for (int i = 0; i < count(); ++i) {
- register QTimerInfo *t = at(i);
+ QTimerInfo *t = at(i);
if (t->obj == object) {
// object found
removeAt(i);
@@ -550,7 +550,7 @@ QList<QAbstractEventDispatcher::TimerInfo> QTimerInfoList::registeredTimers(QObj
{
QList<QAbstractEventDispatcher::TimerInfo> list;
for (int i = 0; i < count(); ++i) {
- register const QTimerInfo * const t = at(i);
+ const QTimerInfo * const t = at(i);
if (t->obj == object) {
list << QAbstractEventDispatcher::TimerInfo(t->id,
(t->timerType == Qt::VeryCoarseTimer
diff --git a/src/corelib/thread/qgenericatomic.h b/src/corelib/thread/qgenericatomic.h
index a0a851eabb..3a213f6a25 100644
--- a/src/corelib/thread/qgenericatomic.h
+++ b/src/corelib/thread/qgenericatomic.h
@@ -172,7 +172,7 @@ template <typename BaseClass> struct QGenericAtomicOps
{
// implement fetchAndStore on top of testAndSet
Q_FOREVER {
- register T tmp = load(_q_value);
+ T tmp = load(_q_value);
if (BaseClass::testAndSetRelaxed(_q_value, tmp, newValue))
return tmp;
}
@@ -207,7 +207,7 @@ template <typename BaseClass> struct QGenericAtomicOps
{
// implement fetchAndAdd on top of testAndSet
Q_FOREVER {
- register T tmp = BaseClass::load(_q_value);
+ T tmp = BaseClass::load(_q_value);
if (BaseClass::testAndSetRelaxed(_q_value, tmp, T(tmp + valueToAdd)))
return tmp;
}
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
index 1ed4a77950..378813c889 100644
--- a/src/corelib/thread/qmutex.cpp
+++ b/src/corelib/thread/qmutex.cpp
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
static inline bool isRecursive(QMutexData *d)
{
- register quintptr u = quintptr(d);
+ quintptr u = quintptr(d);
if (Q_LIKELY(u <= 0x3))
return false;
#ifdef QT_LINUX_FUTEX
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index dc3f5f3be9..75900e9775 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -261,8 +261,8 @@ int qstrcmp(const char *str1, const char *str2)
int qstricmp(const char *str1, const char *str2)
{
- register const uchar *s1 = reinterpret_cast<const uchar *>(str1);
- register const uchar *s2 = reinterpret_cast<const uchar *>(str2);
+ const uchar *s1 = reinterpret_cast<const uchar *>(str1);
+ const uchar *s2 = reinterpret_cast<const uchar *>(str2);
int res;
uchar c;
if (!s1 || !s2)
@@ -295,8 +295,8 @@ int qstricmp(const char *str1, const char *str2)
int qstrnicmp(const char *str1, const char *str2, uint len)
{
- register const uchar *s1 = reinterpret_cast<const uchar *>(str1);
- register const uchar *s2 = reinterpret_cast<const uchar *>(str2);
+ const uchar *s1 = reinterpret_cast<const uchar *>(str1);
+ const uchar *s2 = reinterpret_cast<const uchar *>(str2);
int res;
uchar c;
if (!s1 || !s2)
@@ -321,7 +321,7 @@ int qstrcmp(const QByteArray &str1, const char *str2)
const char *str1data = str1.constData();
const char *str1end = str1data + str1.length();
for ( ; str1data < str1end && *str2; ++str1data, ++str2) {
- register int diff = int(uchar(*str1data)) - uchar(*str2);
+ int diff = int(uchar(*str1data)) - uchar(*str2);
if (diff)
// found a difference
return diff;
@@ -357,8 +357,8 @@ int qstrcmp(const QByteArray &str1, const QByteArray &str2)
#if 0
static void createCRC16Table() // build CRC16 lookup table
{
- register unsigned int i;
- register unsigned int j;
+ unsigned int i;
+ unsigned int j;
unsigned short crc_tbl[16];
unsigned int v0, v1, v2, v3;
for (i = 0; i < 16; i++) {
@@ -410,7 +410,7 @@ static const quint16 crc_tbl[16] = {
quint16 qChecksum(const char *data, uint len)
{
- register quint16 crc = 0xffff;
+ quint16 crc = 0xffff;
uchar c;
const uchar *p = reinterpret_cast<const uchar *>(data);
while (len--) {
@@ -2671,7 +2671,7 @@ QByteArray QByteArray::mid(int pos, int len) const
QByteArray QByteArray::toLower() const
{
QByteArray s(*this);
- register uchar *p = reinterpret_cast<uchar *>(s.data());
+ uchar *p = reinterpret_cast<uchar *>(s.data());
if (p) {
while (*p) {
*p = QChar::toLower((ushort)*p);
@@ -2694,7 +2694,7 @@ QByteArray QByteArray::toLower() const
QByteArray QByteArray::toUpper() const
{
QByteArray s(*this);
- register uchar *p = reinterpret_cast<uchar *>(s.data());
+ uchar *p = reinterpret_cast<uchar *>(s.data());
if (p) {
while (*p) {
*p = QChar::toUpper((ushort)*p);
diff --git a/src/corelib/tools/qbytearraymatcher.cpp b/src/corelib/tools/qbytearraymatcher.cpp
index bcd6a56aad..d030192117 100644
--- a/src/corelib/tools/qbytearraymatcher.cpp
+++ b/src/corelib/tools/qbytearraymatcher.cpp
@@ -61,7 +61,7 @@ static inline int bm_find(const uchar *cc, int l, int index, const uchar *puc, u
return index > l ? -1 : index;
const uint pl_minus_one = pl - 1;
- register const uchar *current = cc + index + pl_minus_one;
+ const uchar *current = cc + index + pl_minus_one;
const uchar *end = cc + l;
while (current < end) {
uint skip = skiptable[*current];
diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp
index 24ca628b5a..6b716b356f 100644
--- a/src/corelib/tools/qlocale_tools.cpp
+++ b/src/corelib/tools/qlocale_tools.cpp
@@ -300,13 +300,13 @@ bool removeGroupSeparators(QLocalePrivate::CharBuff *num)
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
-qulonglong qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok)
+qulonglong qstrtoull(const char *nptr, const char **endptr, int base, bool *ok)
{
- register const char *s = nptr;
- register qulonglong acc;
- register unsigned char c;
- register qulonglong qbase, cutoff;
- register int any, cutlim;
+ const char *s = nptr;
+ qulonglong acc;
+ unsigned char c;
+ qulonglong qbase, cutoff;
+ int any, cutlim;
if (ok != 0)
*ok = true;
@@ -381,13 +381,13 @@ qulonglong qstrtoull(const char *nptr, const char **endptr, register int base, b
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
-qlonglong qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok)
+qlonglong qstrtoll(const char *nptr, const char **endptr, int base, bool *ok)
{
- register const char *s;
- register qulonglong acc;
- register unsigned char c;
- register qulonglong qbase, cutoff;
- register int neg, any, cutlim;
+ const char *s;
+ qulonglong acc;
+ unsigned char c;
+ qulonglong qbase, cutoff;
+ int neg, any, cutlim;
/*
* Skip white space and pick up leading +/- sign if any.
diff --git a/src/corelib/tools/qlocale_tools_p.h b/src/corelib/tools/qlocale_tools_p.h
index 3c4e9b5bd5..cb47bfcb5e 100644
--- a/src/corelib/tools/qlocale_tools_p.h
+++ b/src/corelib/tools/qlocale_tools_p.h
@@ -110,8 +110,8 @@ bool removeGroupSeparators(QLocalePrivate::CharBuff *num);
Q_CORE_EXPORT char *qdtoa(double d, int mode, int ndigits, int *decpt,
int *sign, char **rve, char **digits_str);
Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok);
-qlonglong qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok);
-qulonglong qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok);
+qlonglong qstrtoll(const char *nptr, const char **endptr, int base, bool *ok);
+qulonglong qstrtoull(const char *nptr, const char **endptr, int base, bool *ok);
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 5e30cf3ecb..1423449a69 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -506,7 +506,7 @@ public:
if (o) {
// increase the strongref, but never up from zero
// or less (-1 is used by QWeakPointer on untracked QObject)
- register int tmp = o->strongref.load();
+ int tmp = o->strongref.load();
while (tmp > 0) {
// try to increment from "tmp" to "tmp + 1"
if (o->strongref.testAndSetRelaxed(tmp, tmp + 1))
@@ -801,7 +801,7 @@ namespace QtSharedPointer {
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerCast(const QSharedPointer<T> &src)
{
- register X *ptr = static_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
+ X *ptr = static_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
return QtSharedPointer::copyAndSetPointer(ptr, src);
}
template <class X, class T>
@@ -813,7 +813,7 @@ Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerCast(const QWeakPointer<T> &sr
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerDynamicCast(const QSharedPointer<T> &src)
{
- register X *ptr = dynamic_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
+ X *ptr = dynamic_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
if (!ptr)
return QSharedPointer<X>();
return QtSharedPointer::copyAndSetPointer(ptr, src);
@@ -827,7 +827,7 @@ Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerDynamicCast(const QWeakPointer
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerConstCast(const QSharedPointer<T> &src)
{
- register X *ptr = const_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
+ X *ptr = const_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
return QtSharedPointer::copyAndSetPointer(ptr, src);
}
template <class X, class T>
@@ -847,7 +847,7 @@ QWeakPointer<X> qWeakPointerCast(const QSharedPointer<T> &src)
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerObjectCast(const QSharedPointer<T> &src)
{
- register X *ptr = qobject_cast<X *>(src.data());
+ X *ptr = qobject_cast<X *>(src.data());
return QtSharedPointer::copyAndSetPointer(ptr, src);
}
template <class X, class T>
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 54b1a084b2..de09e5bbe0 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -266,7 +266,7 @@ static bool qMemEquals(const quint16 *a, const quint16 *b, int length)
if (a == b || !length)
return true;
- register union {
+ union {
const quint16 *w;
const quint32 *d;
quintptr value;
@@ -291,7 +291,7 @@ static bool qMemEquals(const quint16 *a, const quint16 *b, int length)
// both addresses are 4-bytes aligned
// do a fast 32-bit comparison
- register const quint32 *e = sa.d + (length >> 1);
+ const quint32 *e = sa.d + (length >> 1);
for ( ; sa.d != e; ++sa.d, ++sb.d) {
if (*sa.d != *sb.d)
return false;
@@ -301,7 +301,7 @@ static bool qMemEquals(const quint16 *a, const quint16 *b, int length)
return (length & 1) ? *sa.w == *sb.w : true;
} else {
// one of the addresses isn't 4-byte aligned but the other is
- register const quint16 *e = sa.w + length;
+ const quint16 *e = sa.w + length;
for ( ; sa.w != e; ++sa.w, ++sb.w) {
if (*sa.w != *sb.w)
return false;
@@ -4908,8 +4908,8 @@ int QString::compare_helper(const QChar *data1, int length1, const QChar *data2,
{
if (cs == Qt::CaseSensitive)
return ucstrcmp(data1, length1, data2, length2);
- register const ushort *s1 = reinterpret_cast<const ushort *>(data1);
- register const ushort *s2 = reinterpret_cast<const ushort *>(data2);
+ const ushort *s1 = reinterpret_cast<const ushort *>(data1);
+ const ushort *s2 = reinterpret_cast<const ushort *>(data2);
return ucstricmp(s1, s1 + length1, s2, s2 + length2);
}
diff --git a/src/corelib/tools/qstringmatcher.cpp b/src/corelib/tools/qstringmatcher.cpp
index d54e9c7ba7..1b8a40ef2f 100644
--- a/src/corelib/tools/qstringmatcher.cpp
+++ b/src/corelib/tools/qstringmatcher.cpp
@@ -69,7 +69,7 @@ static inline int bm_find(const ushort *uc, uint l, int index, const ushort *puc
return index > (int)l ? -1 : index;
const uint pl_minus_one = pl - 1;
- register const ushort *current = uc + index + pl_minus_one;
+ const ushort *current = uc + index + pl_minus_one;
const ushort *end = uc + l;
if (cs == Qt::CaseSensitive) {
while (current < end) {