aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2016-05-12 10:47:30 +0200
committerShawn Rutledge <shawn.rutledge@theqtcompany.com>2016-05-12 11:56:06 +0000
commited7d33ebcddc617a7e0197aa559e2fb15ce7a172 (patch)
tree448685a5ec652c873c3086158a886c75b461b31c /src
parent50b12610a701e14c315839cd091e0f654c52f019 (diff)
Fix anchor enum again, now for more broken versions of GCC.
Apparently only very recent versions of gcc can correctly deduce that the Anchor enum can be stored in a 7-bit bitfield. So to be sure we don't run into compiler errors, do not specify the base type for any GCC version. Task-number: QTBUG-53317 Change-Id: I825946862dea1eabfb68a3fbe8cbd31bc71bdd10 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickanchors_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquickanchors_p.h b/src/quick/items/qquickanchors_p.h
index 2b054e4118..f00b8b5ba7 100644
--- a/src/quick/items/qquickanchors_p.h
+++ b/src/quick/items/qquickanchors_p.h
@@ -90,9 +90,9 @@ public:
virtual ~QQuickAnchors();
enum Anchor
-#if !(defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && (Q_CC_GNU < 500))
+#if defined(Q_CC_CLANG) || !defined(Q_CC_GNU) // meaning: clang and msvc, but NOT gcc proper (because, you know, Q_CC_CLANG implies Q_CC_GNU)
// Not specifying the enum base type will have MSVC 'interpret' it as signed instead of an unsigned bit-field.
- // However, specifying the enum base type breaks GCC 4.x on OpenSUSE 13.something, where it complains that it can't store all values in a 7 bit bitfield.
+ // However, specifying the enum base type breaks many GCCs, which complain that it can't store all values in a 7 bit bitfield.
: uint
#endif
{