summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qcompilerdetection.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * Merge remote-tracking branch 'origin/5.4.1' into 5.4Frederik Gladhorn2015-02-101-1/+4
| |\ | | | | | | | | | Change-Id: I9d668a655b548feab43e9d4b03e2437bdff76437
| | * Correct the version of ICC that has the constexpr bug fixedThiago Macieira2015-01-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | 01fc82e3574614762d2ce061dd45ce4995c79e7f updated the code for ICC 15, but it needs to be 15.0.1 Change-Id: Iba8d819ab9174d9dac07ffff13bbc26b9be46d53 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge dev into 5.5Oswald Buddenhagen2015-02-231-0/+5
|\ \ \ | | | | | | | | | | | | Change-Id: Id6dbbbfc542c214fe695c6795c6aaf23aedc1cd1
| * | | Disable constexpr support for QNXSean Harmer2015-02-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though the compiler on QNX supports C++11, the stdlib it ships with is missing constexpr on many important functions. This is required to make qtbase compile on QNX 6.6. Change-Id: I59a4263483b1d94b9d2dceb947876e445f9662af Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | | Use Clang 3.6's __builtin_assume in Q_ASSUMEThiago Macieira2015-02-171-1/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's more efficient than the current implementation. Example: int f(int i) { Q_ASSUME(i < 8); return i < 8; } Before: cmpl $8, %edi setl %al movzbl %al, %eax retq After: movl $1, %eax retq Change-Id: I1a800c709d3543699131ffff13c1c50713a8da2c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | QNX: fix compiler detection.Rafael Roquetto2015-02-121-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Short version: fix build on QNX 6.5.0. C++11 has been included on QNX 6.6.0's libcpp (Dinkum C++11 libs), while continuing to be unsupported by the older QNX 6.5.0 toolchain. This patch updates the mechanism for detecting the QNX's libcpp that is being used during compile time, and also updates the list of C++11 features to be disabled when QNX C++11 support is not present by adding Q_COMPILER_UNICODE_STRINGS and Q_COMPILER_NOEXCEPT to it. Change-Id: Iddb3626206a0d97d7103c1ff17ba0ae953e9a4b9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-211-0/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * | Move enabling of C++11 Unicode Strings with ICC from 12.1 to 14.0Thiago Macieira2015-01-171-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The support in 12.1 and 13.x appears to be incomplete. Move it to the official supported version https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler Note: this commit will cause a conflict in 5.5 against 99357e32a0e29c73ed721d6d31da66635e6586ca Task-number: QTBUG-43864 Change-Id: Ic5d393bfd36e48a193fcffff13b9a07106e96795 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Give ICC-as-Clang a Q_CC_CLANG version number tooThiago Macieira2015-01-061-0/+4
| | | | | | | | | | | | | | Give it version number 3.5 for current compatibility. Change-Id: Ia023d29b3b3946f8642a0550279ae63cbb803fc5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * Re-enable constexpr for ICC 15Thiago Macieira2015-01-061-0/+1
| | | | | | | | | | | | | | | | | | The bug noted in d88e4edcd548e5bb024e75016c5a3449d103bd8d appears to be resolved. Change-Id: Id20906ff83f74bd16267d44bf447626b81187e71 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Remove Q_C_CALLBACKSThiago Macieira2015-01-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useless. The C++ language does require callbacks passed to C functions to also be extern "C". That's what this macro was doing. But #ifdef'ing for the macro only made the code uglier. Just let the extern "C" be there for all compilers. PS: C++ classes can't be extern "C"... Change-Id: Ic5d393bfd36e48a193fcffff13b9c9b3923443dd Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Fix detection of C++11 Unicode strings with icl.exeThiago Macieira2014-12-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Even though the compiler supports it, the MSVC headers might do something wrong and make compilation fail later due to attempting to overload unsigned short with char16_t. The _CHAR16_T definition comes from <cstddef>, so include that instead of <stddef.h> in C++ mode. Change-Id: Ifaeb1c92bde2db4ed4129507462391904afd6510 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Unbreak the build with the Intel compiler on WindowsThiago Macieira2014-12-201-1/+11
| | | | | | | | | | | | | | | | icl.exe behaves like cl.exe (MSVC), so we should use the MSVC-style of __pragma instead of _Pragma. Change-Id: Ieee740c430589c3bb1b964138f8bf7f58b8d2892 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove Q_NO_USING_KEYWORDThiago Macieira2014-12-201-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a lot of code now requiring it. Any compiler that doesn't support the keyword is too old for Qt now. The last time anyone asked about this macro was for QTBUG-27393 and we don't know which compiler that was. As a necessity, this patch contains a reversal of a0c3a57aed5cde37017733e7cf5e41cc6a1174aa [ChangeLog][Compiler Specific Changes] Qt 5.5 now unconditionally uses the "using" keyword. Compilers that do not support this keyword are deprecated and will not be able to build Qt. Previous versions of Qt may or may not compile, as no testing was done to ensure it worked. Change-Id: Ief042f34aba555a095d1f342a0ee7ee9feadf42d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-181-6/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/platformsupport/platformcompositor/qopenglcompositor.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I5422868500be695584a496dbbbc719d146bc572d
| * Fix the Apple build version numbers for ClangThiago Macieira2014-12-121-6/+6
| | | | | | | | | | | | | | | | A bunch of zeroes were missing. And not to the left. Task-number: QTBUG-43279 Change-Id: I1a710cf572099547b2ade7b2574a7e0a61649758 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Add the C++11 features supported by Visual Studio 2015Thiago Macieira2014-12-131-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested with the November 2014 Preview. There are three C++11 features that aren't supported as of MSVC2015: - attributes - constexpr - uniform initialization Microsoft recognizes that constexpr support in this compiler is partial, so we don't enable it yet. Attributes are not implemented at all. As for uniform initialization, Microsoft's feature list says initalizer_list is supported, but we still see compile errors trying to initialize arrays in constructor initialization lists. Change-Id: Id686ccb6b4b2ecd63f16d308552174db1f05f2c5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Add macros for enabling/disabling warningsThiago Macieira2014-12-031-1/+45
| | | | | | | | | | | | | | | | | | | | This allows us to avoid the ugly #if for compiler versions. We might still need for when a warning only occurs in one compiler version, but otherwise the code will be much cleaner. Change-Id: Ibc941d898b3dad2e3d87c11378f29139c31f0fff Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-241-19/+47
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * Define the Intel compiler and Microsoft C++ versions in the Q_CC_ macrosThiago Macieira2014-11-051-3/+3
| | | | | | | | | | | | | | | | | | This is for completeness, since we've done the same for Q_CC_GNU and Q_CC_CLANG. We won't really use the macros like this because both __INTEL_COMPILER and _MSC_VER are readily usable. Change-Id: I669c60166fa4839d43f84f339e6896321d62817f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Store the GCC version number in Q_CC_GNUThiago Macieira2014-11-051-12/+12
| | | | | | | | | | | | | | | | | | | | | | The sequence of (__GNUC__ * 100 + __GNUC_MINOR__) was used in quite a few places. Simplify it to make the code more readable. This follows the change done for Clang, which was quite necessary since Apple's version of Clang has different build numbers. Change-Id: I886271a5a5f21ae59485ecf8d140527723345a46 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Define Q_CC_CLANG to be the version of upstream Clang that's in useTor Arne Vestbø2014-11-051-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | We map the Apple Clang versions to upstream, so that we have one define to compare against. Fixes build break on iOS due to qbasicatomic.h not defining QT_BASIC_ATOMIC_HAS_CONSTRUCTORS on Apple Clang versions, which is needed after 1e9db9f5e18123f2e686c10b Change-Id: I17493c0187c20abc5d22e71944d62bfd16afbad2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Enable C++11 atomics with ClangThiago Macieira2014-10-311-1/+3
| | | | | | | | | | | | | | | | I don't know why it was an #if 0. The __has_feature has been there for a while. But, just to be sure, we check the presence of the header too. Change-Id: I36e34c9e8fd4ce55c98966d2fad246b77eb16597 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Fix compilation of <atomic> with ICC and libc++Thiago Macieira2014-10-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The libc++ header does this: #if !__has_feature(cxx_atomic) #error <atomic> is not implemented So we can't enable the feature until the compiler reports true for that test. Change-Id: I96f1c7eea8b93d93bd721fe5a85fa987339d091f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Add Q_DECL_RELAXED_CONSTEXPR macroOlivier Goffart2014-10-241-1/+10
|/ | | | | | | | | Expands to constexpr if C++14 relaxed constepxr are supported by the compiler [ChangeLog][QtCore] Added Q_DECL_RELAXED_CONSTEXPR for the corresponding C++14 feature Change-Id: Id6b56b3a17da2ff838c80795e528e1247dc13f63 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Gcc 4.5.* build fix.Tomasz Olszak2014-10-101-2/+5
| | | | | | | | | | | | | | | Q_COMPILER_DEFAULT_MEMBERS and Q_COMPILER_DELETE_MEMBERS are now set starting from gcc 4.6. Pre-4.6 compilers implement a non-final snapshot of N2346, hence default and delete functions are supported only if they are public. Starting from 4.6, GCC handles final version - the access modifier is not relevant. Compiler error: qsharedpointer_impl.h:717:31: error: 'QEnableSharedFromThis<T>::QEnableSharedFromThis()' declared with non-public access cannot be defaulted in the class body Change-Id: If1d3d4696f91912a09ca72bd4aa1fb07f491a0cb Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not use Q_COMPILER_CLASS_ENUM for gcc 4.4hjk2014-09-291-1/+1
| | | | | | | | | | | | | It breaks the compiler self-test: tst_compiler.cpp:754: error: no matching function for call to ‘qCompare(tst_Compiler::cxx11_class_enum()::X&, tst_Compiler::cxx11_class_enum()::X, const char [2], const char [13], const char [17], int)’ We not should assume it is safe to use, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37946. Change-Id: I72c9c56e3e4f62bdfdfa133b6b0a2e610b5331c8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Bump Q_COMPILER_INITIALIZER_LISTS to GCC 4.5Adam Majer2014-09-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | While GCC 4.4 has the required header, it is missing important typedefs requiring use of pointers instead. This is acceptable if only used in one or two places, but a quick search through the source code lists quite a few usages of const_iterator typedef. $ git grep -c initializer_list\<.\*\>::const_iterator src/corelib/global/qflags.h:2 src/corelib/json/qjsonarray.h:1 src/corelib/json/qjsonobject.h:1 src/corelib/tools/qhash.h:2 src/corelib/tools/qmap.h:2 src/corelib/tools/qset.h:1 The lesser-evil is to bump Q_COMPILER_INITIALIZER_LISTS to version GCC 4.5 and retain usage of required (by standard) initializer_list typedefs. Change-Id: I38d6fa0ef3dc7d958587b406d33e3e3a7378c026 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the last remnants of iWMMXt in QtThiago Macieira2014-08-051-1/+0
| | | | | | | | This code hasn't been tested for at least 4 years. It's not maintained and probably doesn't work. Change-Id: I4b9a5179e34111b400914f91caa6b741b69771bb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add a few missing Neon constructsThiago Macieira2014-08-051-0/+1
| | | | | | | | | | | The #undef in qcompilerdetection.h was missing. And apparently we can detect Neon since Windows Mobile 6 too. Change-Id: I38a5f71b2704a29a706183e39f43db3a78a729db Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Introduce Q_DECL_UNUSED_MEMBER for clangKai Koehne2014-07-231-1/+11
| | | | | | | | | | | | | | | | Since version 3.2, clang warns about unused member variables (-Wunused-private-field). Marking such members with Q_DECL_UNUSED_MEMBER will silence this warning. This is a cleaner way than using Q_UNUSED() somewhere in the class methods (like we did previously in qloggingcategory.cpp). It mirrors Q_DECL_UNUSED for unused variables, which however can't be used unconditionally for member variables because e.g. gcc will complain. Change-Id: I2afff683a7c3bae3bdcd684e5085a643887bb2a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-141-1/+2
|\ | | | | | | | | | | | | Conflicts: src/gui/text/qfontengine_qpf2.cpp Change-Id: Ib04f92c41d0edd55d3aef8fb1708d917fba0f2a8
| * Work around ICC bug in brace initializations containing constexprThiago Macieira2014-07-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ICC miscompiles this: struct Inner { int i; constexpr Inner(int i) : i(i) {}}; struct Outer { Inner i; }; const Outer x = { -1 }; (Inner = QBasicAtomicInt; Outer = QtPrivate::RefCount, then again for QListData::Data) We expect x to be placed in read-only memory and require no load-time constructor. ICC unfortunately does not do that. By adding a constexpr constructor to Outer, it starts behaving like we expect it to, but falls apart again if you do "const Outer x[]" (the QArrayData statics). The solution is to probably make the varaibles constexpr too, but that's a job for the development branch. Intel issue Id: 6000056211 Intel bug: DPD200534796 Change-Id: Ie9fb5428106486254b7329403890754f300d58c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove QT_STATIC_CONSTThiago Macieira2014-07-071-12/+0
| | | | | | | | | | | | | | | | | | | | | | This macro is no longer used. It was introduced probably by mistake, due to MSVC not following the strict string requirement of the C and C++ standards by default (you can assign a string literal to a non-const char*). Change-Id: I4b221dd435191b0eea689dbed35915cf3206648b Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Add Q_COMPILER_THREADSAFE_STATICS (a.k.a. "Magic Statics")Thiago Macieira2014-06-271-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | It had been so far only supported by GNU-style compilers due to the IA-64 portable C++ ABI. But it's mandated by C++11, so let's add the macro and use it in Q_GLOBAL_STATIC. Looks like Visual Studio "14" will support it. Change-Id: I9710b5146606c7e494c43413f49900419396cfe0 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | Update MSVC compiler features according to testingThiago Macieira2014-06-251-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like a few extra features have been supported for a while and we had never noticed. That includes the C++98 template friends, C++11 extern templates and C++11 nullptr. They've been supported since at least MSVC 2010, possibly even earlier, but I don't have MSVC 2008 to test with. Testing also indicates that MSVC 2012 and 2013 have a bug in their support for the range for construct. The following code fails to compile: for (int i : l) do { (void)0; } while (0); test.cpp(2) : error C2059: syntax error : '}' Reported as https://connect.microsoft.com/VisualStudio/feedback/details/903999/c-11-range-for-construct-fails-to-compile-when-body-is-a-do-while-block Change-Id: I5d0156f4c847c45fa1f6f5b9ee4ddbdacb8ab59b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Only define the MSVC C++11 feature macros in C++Thiago Macieira2014-06-251-0/+2
| | | | | | | | | | | | | | | | Don't define them if qcompilerdetection.h was compiled in C mode. Change-Id: I080b62ef7c68bb582e55e9e3a1dff4e6c1bb48bd Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Deprecate the C++14 compiler feature macrosThiago Macieira2014-06-191-26/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's now a C++ standards Standing Document that defines preprocessor macros in the same way that we used to. So we no longer need to define them ourselves. The current macros are kept for compatibility purposes, for the compilers where they used to be defined. The list will not be extended with new macros or for new compiler versions. [ChangeLog][Deprecation Notice] The Q_COMPILER_xxx macros for C++14 compiler features introduced in Qt 5.3 are deprecated and will not be updated for new compilers either. User code should be changed to use the macros from Standing Document 6 instead: http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations. This does not affect C++11 feature macros. Change-Id: I246afb84263f3d7ff72ccc0bc44bf86a6fc7cd96 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Add the C++11 feature macros for ICC 15 and complete for 14Thiago Macieira2014-06-181-0/+9
| | | | | | | | | | | | | | | | | | | | ICC 14 (Intel Composer XE 2013) already supported range for and explicit conversions, but looks like we missed adding them. ICC 15 (Intel Composer XE 2015) is C++11 language feature complete. Change-Id: I6eb8a3059f5df3604716666311aa01a6cf01918d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-061-8/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
| * Disable C++11 initializer lists and rvalue refs for old libstdc++Thiago Macieira2014-04-141-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can happen if you're using a recent compiler other than GCC (that is, Clang or Intel) and using an older version of the GCC headers. The check is not strictly correct: we're disabling for libstdc++ that came with GCC 4.2 and enabling for everything afterwards, even though both of those features were not present in GCC 4.3. However, the __GLIBC_LIBSTD__ macro only exists on Apple's patched version of libstdc++ and they're not going to update it anyway. libstdc++ does not provide a version macro that we can use. Task-number: QTBUG-38193 Change-Id: I34d38a2f2e5b4ac51bce35c30ec0fcf19de9cdf4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
| * Disable all C++11 rvalue refs with Dinkumware C++ library tooThiago Macieira2014-04-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Our code assumes that Q_COMPILER_REF_QUALIFIERS implies Q_COMPILER_RVALUE_REFS. Technically, it should check both macros, but the only point of ref qualifiers is to have both lvalue- and rvalue- reference member functions. We might then use std::move without a check to see if the standard library does provide it. Change-Id: Ia3eedd298c2218f100aee2e41bdea6e2c5c07a15 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
| * Remove the #ifdef check just before #undefThiago Macieira2014-04-141-6/+2
| | | | | | | | | | | | | | | | No warning is printed anyway. This code is only for one compiler (GCC on QNX, a.k.a. QCC). Change-Id: I28d085c72ab5a957146efab0a36c72f213d9d2c3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-111-2/+8
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-armv7le-qcc/qplatformdefs.h src/printsupport/kernel/qcups.cpp src/widgets/styles/qstyle.h tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp Change-Id: Ia41e13051169a6d4a8a1267548e7d47b859bb267
| * Only define Q_COMPILER_INITIALIZER_LISTS for MSVC 12 SP 2Frederik Gladhorn2014-04-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Nested initialization is broken before SP2, so just disable the whole feature as tst_qvector crashes(release)/fails(debug) Done-with: Jedrzej Nowacki Task-number: QTBUG-38186 Change-Id: I9c5c9e55c75854fc1f05a59fab2ac7dce9b37fbb Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Mark Variable Length Arrays as a TS feature for C++14Thiago Macieira2014-04-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The feature was removed from the C++14 draft standard and moved instead to a Technical Specification. Since we don't know how to enable TS features in GCC 4.9 yet, remove it from the definition. The Clang definition is probably safe, since it is behind an #if __has_extension. Change-Id: Ibc32b35657b046680078b39a7678bd8e1e5395d2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2014-03-131-1/+1
|\| | | | | | | Change-Id: Idec54e19963e8d88c711cb179cffc81596323899