From e2d60fdcc37a6b7cd47b7495061752266d101d06 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 10 Jun 2015 11:39:55 +0200 Subject: [PATCH] Cmb: Workaround for gcc 4.7 bug The default constructor has no noexcept specifier for gcc 4.7 Change-Id: If204c19e21bc368d755c8d6508fd490f71be6f6c Reviewed-by: Nikolai Kosjar --- .../ipcsource/projectpartsdonotexistexception.h | 6 ++++++ .../ipcsource/translationunitdoesnotexistexception.h | 6 ++++++ .../ipcsource/translationunitfilenotexitexception.h | 6 ++++++ .../ipcsource/translationunitisnullexception.h | 6 ++++++ .../ipcsource/translationunitparseerrorexception.h | 6 ++++++ 5 files changed, 30 insertions(+) diff --git a/src/tools/codemodelbackend/ipcsource/projectpartsdonotexistexception.h b/src/tools/codemodelbackend/ipcsource/projectpartsdonotexistexception.h index 4e7010f8e61..5ae7088a596 100644 --- a/src/tools/codemodelbackend/ipcsource/projectpartsdonotexistexception.h +++ b/src/tools/codemodelbackend/ipcsource/projectpartsdonotexistexception.h @@ -46,6 +46,12 @@ public: const char *what() const Q_DECL_NOEXCEPT override; +#ifdef __GNUC__ +# if !__GNUC_PREREQ(4,8) + ~ProjectPartDoNotExistException() noexcept {} +# endif +#endif + private: Utf8StringVector projectPartIds_; mutable Utf8String what_; diff --git a/src/tools/codemodelbackend/ipcsource/translationunitdoesnotexistexception.h b/src/tools/codemodelbackend/ipcsource/translationunitdoesnotexistexception.h index 87a5b53c015..7be8f35539e 100644 --- a/src/tools/codemodelbackend/ipcsource/translationunitdoesnotexistexception.h +++ b/src/tools/codemodelbackend/ipcsource/translationunitdoesnotexistexception.h @@ -45,6 +45,12 @@ public: const char *what() const Q_DECL_NOEXCEPT override; +#ifdef __GNUC__ +# if !__GNUC_PREREQ(4,8) + ~TranslationUnitDoesNotExistException() noexcept {} +# endif +#endif + private: FileContainer fileContainer_; mutable Utf8String what_; diff --git a/src/tools/codemodelbackend/ipcsource/translationunitfilenotexitexception.h b/src/tools/codemodelbackend/ipcsource/translationunitfilenotexitexception.h index c629f8e86f4..1242b362fb4 100644 --- a/src/tools/codemodelbackend/ipcsource/translationunitfilenotexitexception.h +++ b/src/tools/codemodelbackend/ipcsource/translationunitfilenotexitexception.h @@ -46,6 +46,12 @@ public: const char *what() const Q_DECL_NOEXCEPT override; +#ifdef __GNUC__ +# if !__GNUC_PREREQ(4,8) + ~TranslationUnitFileNotExitsException() noexcept {} +# endif +#endif + private: Utf8String filePath_; mutable Utf8String what_; diff --git a/src/tools/codemodelbackend/ipcsource/translationunitisnullexception.h b/src/tools/codemodelbackend/ipcsource/translationunitisnullexception.h index d1bf67fab73..b8b402c20ea 100644 --- a/src/tools/codemodelbackend/ipcsource/translationunitisnullexception.h +++ b/src/tools/codemodelbackend/ipcsource/translationunitisnullexception.h @@ -41,6 +41,12 @@ class TranslationUnitIsNullException : public std::exception { public: const char *what() const Q_DECL_NOEXCEPT override; + +#ifdef __GNUC__ +# if !__GNUC_PREREQ(4,8) + ~TranslationUnitIsNullException() noexcept {} +# endif +#endif }; } // namespace CodeModelBackEnd diff --git a/src/tools/codemodelbackend/ipcsource/translationunitparseerrorexception.h b/src/tools/codemodelbackend/ipcsource/translationunitparseerrorexception.h index 0f012244b6c..68deacc1f86 100644 --- a/src/tools/codemodelbackend/ipcsource/translationunitparseerrorexception.h +++ b/src/tools/codemodelbackend/ipcsource/translationunitparseerrorexception.h @@ -47,6 +47,12 @@ public: const char *what() const Q_DECL_NOEXCEPT override; +#ifdef __GNUC__ +# if !__GNUC_PREREQ(4,8) + ~TranslationUnitParseErrorException() noexcept {} +# endif +#endif + private: Utf8String filePath_; Utf8String projectPartId_;