Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
None
-
MSVS 2012, Windows 7
-
1b3a424bcf5948aefd72e514cf40662deeabbe30
Description
This is something PCLint is complaining about and I agree with it.
QBasicAtomicInt is based on a 'volatile int' _q_value type. This cascades through several layers of files and templates into QAtomicOps<int> (qbasicatomic.h:134). QAtomicOps is an interface template definition that is built on QAtomicOpsBySize, which has 1 specialization for size 4. This all works very well on 32-bit machines (size=4), but on a 64-bit machine the int will most likely be defined as 64-bit and thus have a size=8.
PCLint is complaining that (qbasicatomic.h:138) typename Ops::Type _q_value; is not defined on 64-bit systems and I have to agree.
So please, either make the QBasicAtomicInt use a 'volatile long' or 'volatile qint32' to fix it to 32 bit OR supply an implementation of QAtomicOpsBySize<8>.