From 1e1f5833b1bfb40f6e5349da3de0390d736791fd Mon Sep 17 00:00:00 2001
From: hjk <hjk121@nokiamail.com>
Date: Thu, 25 Sep 2014 13:35:26 +0200
Subject: [PATCH] Do not use Q_COMPILER_CLASS_ENUM for gcc 4.4
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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>
---
 src/corelib/global/qcompilerdetection.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 48adc43b77..ac60d47c7e 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -730,7 +730,6 @@
        /* C++11 features supported in GCC 4.4: */
 #      define Q_COMPILER_AUTO_FUNCTION
 #      define Q_COMPILER_AUTO_TYPE
-#      define Q_COMPILER_CLASS_ENUM
 #      define Q_COMPILER_DEFAULT_MEMBERS
 #      define Q_COMPILER_DELETE_MEMBERS
 #      define Q_COMPILER_EXTERN_TEMPLATES
@@ -746,6 +745,7 @@
 #      define Q_COMPILER_INITIALIZER_LISTS
 #      define Q_COMPILER_LAMBDA
 #      define Q_COMPILER_RAW_STRINGS
+#      define Q_COMPILER_CLASS_ENUM
 #    endif
 #    if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
        /* C++11 features supported in GCC 4.6: */