diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-08-17 09:23:20 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-08-17 13:03:52 +0200 |
commit | 1b93bdca241d1226eda4175abe44124194e11e23 (patch) | |
tree | 699aca9083845d19f399f6976112f1b09130683a /src/libs/cplusplus/MatchingText.cpp | |
parent | 1b2f1f102e9c43e81dccf9ff31eccf6f441a662f (diff) | |
download | qt-creator-1b93bdca241d1226eda4175abe44124194e11e23.tar.gz |
Disable gcc warning about always-true Q_ASSERT check
gcc 4.5.1 warned about the Q_ASSERT in QStringRef::at() being
always false for isCompleteStringLiteral, isCompleteCharLiteral.
Change-Id: Idb20f81f92876eff685166c8deeebd6e151303b1
Reviewed-on: http://codereview.qt.nokia.com/3070
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'src/libs/cplusplus/MatchingText.cpp')
-rw-r--r-- | src/libs/cplusplus/MatchingText.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libs/cplusplus/MatchingText.cpp b/src/libs/cplusplus/MatchingText.cpp index ad87b0c32a..7be70afa51 100644 --- a/src/libs/cplusplus/MatchingText.cpp +++ b/src/libs/cplusplus/MatchingText.cpp @@ -55,6 +55,15 @@ static bool shouldOverrideChar(QChar ch) } } +// disable gcc warning: +// +// qstring.h:1175:39: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false +// +// caused by Q_ASSERT in QStringRef::at() +#ifdef Q_CC_GNU +# pragma GCC diagnostic ignored "-Wstrict-overflow" +#endif + static bool isCompleteStringLiteral(const BackwardsScanner &tk, int index) { const QStringRef text = tk.textRef(index); |