diff --git a/Framework/API/test/FunctionParameterDecoratorTest.h b/Framework/API/test/FunctionParameterDecoratorTest.h
index c5a2c508da31f8e513c7efe745973953bb087adb..25e4f27ec766e45d80b2e9cd027cc292254aa70b 100644
--- a/Framework/API/test/FunctionParameterDecoratorTest.h
+++ b/Framework/API/test/FunctionParameterDecoratorTest.h
@@ -443,9 +443,9 @@ private:
   class MockTestableFunctionParameterDecorator
       : public TestableFunctionParameterDecorator {
   public:
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_METHOD1(beforeDecoratedFunctionSet, void(const IFunction_sptr &));
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 };
 
diff --git a/Framework/API/test/ILatticeFunctionTest.h b/Framework/API/test/ILatticeFunctionTest.h
index a64dc65bd213314393182ea7620a5a986d7a421e..911f75766934c21cc7ca08e30a9bb92f479b6898 100644
--- a/Framework/API/test/ILatticeFunctionTest.h
+++ b/Framework/API/test/ILatticeFunctionTest.h
@@ -73,7 +73,7 @@ public:
 
 private:
   std::vector<V3D> getTestHKLs() { return {{1, 1, 0}}; }
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   // Mock function to check whether the correct methods are called
   class MockLatticeFunction : public ILatticeFunction {
   public:
@@ -104,6 +104,6 @@ private:
   };
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif /* MANTID_API_ILATTICEFUNCTIONTEST_H_ */
diff --git a/Framework/API/test/ImplicitFunctionFactoryTest.h b/Framework/API/test/ImplicitFunctionFactoryTest.h
index 30b1acfa60e63d7ca1869cd48503c07badf99827..ce801bdfb4266e90833c78bdf48b609477cacfe2 100644
--- a/Framework/API/test/ImplicitFunctionFactoryTest.h
+++ b/Framework/API/test/ImplicitFunctionFactoryTest.h
@@ -16,7 +16,7 @@
 #include <memory>
 #include <vector>
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class ImplicitFunctionFactoryTest : public CxxTest::TestSuite {
 private:
@@ -107,7 +107,7 @@ private:
     MOCK_METHOD1(setSuccessorParser,
                  void(Mantid::API::ImplicitFunctionParameterParser *successor));
   };
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 
   class MockImplicitFunctionBuilderA
       : public Mantid::API::ImplicitFunctionBuilder {
diff --git a/Framework/API/test/ImplicitFunctionParameterParserFactoryTest.h b/Framework/API/test/ImplicitFunctionParameterParserFactoryTest.h
index 86b2f1f05b52eeb27076a2bd17301d25443c3a2c..91b7a1435c711b2e8b4b06f324334b3157607e1b 100644
--- a/Framework/API/test/ImplicitFunctionParameterParserFactoryTest.h
+++ b/Framework/API/test/ImplicitFunctionParameterParserFactoryTest.h
@@ -17,11 +17,11 @@ private:
   class MockImplicitFunctionParameter
       : public Mantid::API::ImplicitFunctionParameter {
   public:
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD0(getName, std::string());
     MOCK_CONST_METHOD0(isValid, bool());
     MOCK_CONST_METHOD0(toXMLString, std::string());
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   protected:
     ImplicitFunctionParameter *clone() const override {
       return new MockImplicitFunctionParameter;
diff --git a/Framework/API/test/LiveListenerTest.h b/Framework/API/test/LiveListenerTest.h
index f26d77e8c48d01072723e76078a695c9170ac3be..50aea1b0ca81cec3fa23637da6cae34105370f2d 100644
--- a/Framework/API/test/LiveListenerTest.h
+++ b/Framework/API/test/LiveListenerTest.h
@@ -14,7 +14,7 @@ public:
     // Set this flag to true for testing
     m_dataReset = true;
   }
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_CONST_METHOD0(name, std::string());
   MOCK_CONST_METHOD0(supportsHistory, bool());
   MOCK_CONST_METHOD0(buffersEvents, bool());
@@ -25,7 +25,7 @@ public:
   MOCK_METHOD0(runStatus, RunStatus());
   MOCK_CONST_METHOD0(runNumber, int());
   MOCK_METHOD1(setAlgorithm, void(const Mantid::API::IAlgorithm &));
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 
 class LiveListenerTest : public CxxTest::TestSuite {
diff --git a/Framework/API/test/ModeratorModelTest.h b/Framework/API/test/ModeratorModelTest.h
index 1ae863636e82806dedcf053cba621f1532f9368b..7d50621a4f0e3ef7417c40076fc0092f56612657 100644
--- a/Framework/API/test/ModeratorModelTest.h
+++ b/Framework/API/test/ModeratorModelTest.h
@@ -13,13 +13,13 @@ public:
   boost::shared_ptr<ModeratorModel> clone() const override {
     return boost::shared_ptr<MockModerator>();
   }
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_CONST_METHOD0(emissionTimeMean, double());
   MOCK_CONST_METHOD0(emissionTimeVariance, double());
   MOCK_CONST_METHOD1(sampleTimeDistribution, double(const double));
   MOCK_METHOD2(setParameterValue,
                void(const std::string &, const std::string &));
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 
 class ModeratorModelTest : public CxxTest::TestSuite {
diff --git a/Framework/API/test/WorkspaceFactoryTest.h b/Framework/API/test/WorkspaceFactoryTest.h
index 6a6a992231c26d52fb9a42974d89094b4272832d..c44240ee2dffd777a3e0d91dc700c607b4d5b508 100644
--- a/Framework/API/test/WorkspaceFactoryTest.h
+++ b/Framework/API/test/WorkspaceFactoryTest.h
@@ -56,9 +56,9 @@ public:
     MatrixWorkspace_sptr space;
     TS_ASSERT_THROWS_NOTHING(
         space = WorkspaceFactory::Instance().create("work", 1, 1, 1));
-    DIAG_OFF("unused-value")
+    GNU_DIAG_OFF("unused-value")
     TS_ASSERT_THROWS_NOTHING(dynamic_cast<WorkspaceTester *>(space.get()));
-    DIAG_ON("unused-value")
+    GNU_DIAG_ON("unused-value")
   }
 
   /** Make a parent, have the child be created with the same sizes */
diff --git a/Framework/API/test/WorkspaceGroupTest.h b/Framework/API/test/WorkspaceGroupTest.h
index 2e42b865bbbe5209286de3d67d9f378bb68d8378..599518c120e25742e4d1b86887fcd6b2d00ba962 100644
--- a/Framework/API/test/WorkspaceGroupTest.h
+++ b/Framework/API/test/WorkspaceGroupTest.h
@@ -58,13 +58,13 @@ private:
 
   // Helper type, representing some concrete workspace type.
   class MockWorkspace : public Mantid::API::Workspace {
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD0(id, const std::string());
     MOCK_CONST_METHOD0(name, const std::string());
     MOCK_CONST_METHOD0(threadSafe, bool());
     MOCK_CONST_METHOD0(toString, const std::string());
     MOCK_CONST_METHOD0(getMemorySize, size_t());
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   private:
     MockWorkspace *doClone() const override {
       throw std::runtime_error("Cloning of MockWorkspace is not implemented.");
diff --git a/Framework/Algorithms/test/MCAbsorptionStrategyTest.h b/Framework/Algorithms/test/MCAbsorptionStrategyTest.h
index eda2cd82a2f7e8c5c9783276e65ee2b24829c84a..a7e9517ace17e043b5bc66b8c1b238728ba0c97c 100644
--- a/Framework/Algorithms/test/MCAbsorptionStrategyTest.h
+++ b/Framework/Algorithms/test/MCAbsorptionStrategyTest.h
@@ -87,7 +87,7 @@ private:
   class MockBeamProfile final : public Mantid::Algorithms::IBeamProfile {
   public:
     using Mantid::Algorithms::IBeamProfile::Ray;
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD1(generatePoint,
                        Ray(Mantid::Kernel::PseudoRandomNumberGenerator &));
     MOCK_CONST_METHOD2(generatePoint,
@@ -95,7 +95,7 @@ private:
                            const Mantid::Geometry::BoundingBox &));
     MOCK_CONST_METHOD1(defineActiveRegion, Mantid::Geometry::BoundingBox(
                                                const Mantid::API::Sample &));
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 };
 
diff --git a/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h b/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h
index 49de83f36a365b644d959a33f102c1b7196d41c3..8685ab50532a292a3e93937d47dcb55adbc9c08f 100644
--- a/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h
+++ b/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h
@@ -13,7 +13,7 @@ using namespace Mantid::Algorithms;
 using namespace testing;
 
 class MockEntropy : public MaxentEntropy {
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
 public:
   MOCK_METHOD2(derivative,
                std::vector<double>(const std::vector<double> &, double));
@@ -29,7 +29,7 @@ public:
   MOCK_METHOD1(imageToData, std::vector<double>(const std::vector<double> &));
   MOCK_METHOD1(dataToImage, std::vector<double>(const std::vector<double> &));
 };
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 using MockEntropy_sptr = std::shared_ptr<MockEntropy>;
 
 class MaxentCalculatorTest : public CxxTest::TestSuite {
diff --git a/Framework/Algorithms/test/MonteCarloTesting.h b/Framework/Algorithms/test/MonteCarloTesting.h
index 5fa56bf294e3ea2529a254c5192fad7f2cfd23d2..2db9ec32bd7f94104632938fddc9e30b57e0843b 100644
--- a/Framework/Algorithms/test/MonteCarloTesting.h
+++ b/Framework/Algorithms/test/MonteCarloTesting.h
@@ -25,7 +25,7 @@ namespace MonteCarloTesting {
 // -----------------------------------------------------------------------------
 class MockRNG final : public Mantid::Kernel::PseudoRandomNumberGenerator {
 public:
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_METHOD0(nextValue, double());
   MOCK_METHOD2(nextValue, double(double, double));
   MOCK_METHOD2(nextInt, int(int, int));
@@ -36,7 +36,7 @@ public:
   MOCK_METHOD2(setRange, void(const double, const double));
   MOCK_CONST_METHOD0(min, double());
   MOCK_CONST_METHOD0(max, double());
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 
 // -----------------------------------------------------------------------------
diff --git a/Framework/Algorithms/test/RebinByTimeBaseTest.h b/Framework/Algorithms/test/RebinByTimeBaseTest.h
index f78858b0ca8cd80a536e49f14838de3569fd8483..28603cdb97d2d2d8978187a5f5518e5355be2ce3 100644
--- a/Framework/Algorithms/test/RebinByTimeBaseTest.h
+++ b/Framework/Algorithms/test/RebinByTimeBaseTest.h
@@ -72,7 +72,7 @@ createEventWorkspace(const int numberspectra, const int nDistrubutedEvents,
   return retVal;
 }
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 /*
  This type is an IEventWorkspace, but not an EventWorkspace.
@@ -115,7 +115,7 @@ private:
 };
 }
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 //=====================================================================================
 // Functional Tests
diff --git a/Framework/Crystal/test/FindSXPeaksHelperTest.h b/Framework/Crystal/test/FindSXPeaksHelperTest.h
index 41d5291204f963958015edc9de876c406a114d14..4870aeebdf97570d8922cceb083ac8c97eb118b3 100644
--- a/Framework/Crystal/test/FindSXPeaksHelperTest.h
+++ b/Framework/Crystal/test/FindSXPeaksHelperTest.h
@@ -16,14 +16,14 @@ using namespace testing;
 
 namespace {
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockProgressBase : public Mantid::Kernel::ProgressBase {
 public:
   MOCK_METHOD1(doReport, void(const std::string &));
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 }
 
 class FindSXPeaksHelperTest : public CxxTest::TestSuite {
diff --git a/Framework/Crystal/test/MockObjects.h b/Framework/Crystal/test/MockObjects.h
index d47b97a1b6974c9e51d8808297457b1e3c813c34..6b49e089e1b93a3b1497462cbf90014c3aa6727e 100644
--- a/Framework/Crystal/test/MockObjects.h
+++ b/Framework/Crystal/test/MockObjects.h
@@ -17,7 +17,7 @@
 namespace Mantid {
 namespace Crystal {
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 // Mock Background strategy
 class MockBackgroundStrategy : public BackgroundStrategy {
@@ -49,7 +49,7 @@ public:
   }
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 }
 }
 
diff --git a/Framework/Crystal/test/PeakBackgroundTest.h b/Framework/Crystal/test/PeakBackgroundTest.h
index 2f74c5255224a27b16e325f22f852c639b626912..cf904d0ce381548c9087b679bea83d4bb016813c 100644
--- a/Framework/Crystal/test/PeakBackgroundTest.h
+++ b/Framework/Crystal/test/PeakBackgroundTest.h
@@ -33,7 +33,7 @@ IPeaksWorkspace_sptr make_peaks_workspace(const V3D &hklPeak) {
   return peakWS;
 }
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 // Mock Background strategy
 class MockIMDIterator : public IMDIterator {
@@ -68,7 +68,7 @@ public:
   MOCK_CONST_METHOD1(isWithinBounds, bool(size_t));
 };
 }
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 class PeakBackgroundTest : public CxxTest::TestSuite {
 public:
diff --git a/Framework/CurveFitting/src/Functions/CrystalElectricField.cpp b/Framework/CurveFitting/src/Functions/CrystalElectricField.cpp
index 6b3850162f4edb53daea9e44a18b35421f8fc612..649819e3bdeec6fbda0a9b55d2d273c6fdbf9bda 100644
--- a/Framework/CurveFitting/src/Functions/CrystalElectricField.cpp
+++ b/Framework/CurveFitting/src/Functions/CrystalElectricField.cpp
@@ -17,7 +17,7 @@ namespace {
 
 // The missing braces warning is a false positive -
 // https://llvm.org/bugs/show_bug.cgi?id=21629
-DIAG_OFF("missing-braces")
+GNU_DIAG_OFF("missing-braces")
 
 // Get a complex conjugate of the value returned by
 // ComplexMatrix::operator(i,j)
@@ -634,7 +634,7 @@ void diagonalise(const ComplexFortranMatrix &hamiltonian,
   eigenvalues += -eshift;
 }
 
-DIAG_OFF("missing-braces")
+GNU_DIAG_OFF("missing-braces")
 
 } // anonymous namespace
 
diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc b/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc
index c3373bc4342faf1a1fd5f5ac2b6ec4d5219d901e..5b2e8cac74b381c960c2ad8ebdcab0d6124af3aa 100644
--- a/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc
+++ b/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc
@@ -1286,7 +1286,7 @@ TMDE(void MDGridBox)::centroidSphere(API::CoordTransform &radiusTransform,
   } // (for each box)
 }
 //-----------------------------------------------------------------------------------------------
-DIAG_OFF("array-bounds")
+GNU_DIAG_OFF("array-bounds")
 /** Integrate the signal within a sphere; for example, to perform single-crystal
  * peak integration.
  * The CoordTransform object could be used for more complex shapes, e.g.
@@ -1490,7 +1490,7 @@ TMDE(void MDGridBox)::integrateCylinder(
   delete[] verticesContained;
   delete[] boxMightTouch;
 }
-DIAG_ON("array-bounds")
+GNU_DIAG_ON("array-bounds")
 
 /**
 Getter for the masking status of the gridded box.
diff --git a/Framework/DataObjects/src/MDHistoWorkspace.cpp b/Framework/DataObjects/src/MDHistoWorkspace.cpp
index 1f6997f1a621634cc713dea53fa8cd17e98e4c09..1f2874b4c3ace8e36109ccc5df4e94d1bad15af9 100644
--- a/Framework/DataObjects/src/MDHistoWorkspace.cpp
+++ b/Framework/DataObjects/src/MDHistoWorkspace.cpp
@@ -1346,7 +1346,7 @@ uint64_t MDHistoWorkspace::sumNContribEvents() const {
 /**
  * Get the Q frame system (if any) to use.
 */
-DIAG_OFF("strict-aliasing")
+GNU_DIAG_OFF("strict-aliasing")
 Kernel::SpecialCoordinateSystem
 MDHistoWorkspace::getSpecialCoordinateSystem() const {
   MDFramesToSpecialCoordinateSystem converter;
diff --git a/Framework/DataObjects/test/MDBoxIteratorTest.h b/Framework/DataObjects/test/MDBoxIteratorTest.h
index 0a0bb76b2879779985bf26e6fec18ea54dfbd4c5..7311861a4c2bbe79437c6ef7caf0d6526b0ae56c 100644
--- a/Framework/DataObjects/test/MDBoxIteratorTest.h
+++ b/Framework/DataObjects/test/MDBoxIteratorTest.h
@@ -492,9 +492,9 @@ public:
             pBC(MDBox<MDLeanEvent<2>, 2>::getBoxController())
 
       {}
-      DIAG_OFF_SUGGEST_OVERRIDE
+      GNU_DIAG_OFF_SUGGEST_OVERRIDE
       MOCK_CONST_METHOD0(getIsMasked, bool());
-      DIAG_ON_SUGGEST_OVERRIDE
+      GNU_DIAG_ON_SUGGEST_OVERRIDE
       ~MockMDBox() override { delete pBC; }
     };
 
@@ -570,10 +570,10 @@ public:
     /// Mock Skipping Policy Type to inject.
     class MockSkippingPolicy : public SkippingPolicy {
     public:
-      DIAG_OFF_SUGGEST_OVERRIDE
+      GNU_DIAG_OFF_SUGGEST_OVERRIDE
       MOCK_CONST_METHOD0(keepGoing, bool());
       MOCK_METHOD0(Die, void());
-      DIAG_ON_SUGGEST_OVERRIDE
+      GNU_DIAG_ON_SUGGEST_OVERRIDE
       ~MockSkippingPolicy() override { Die(); }
     };
 
diff --git a/Framework/DataObjects/test/MDGridBoxTest.h b/Framework/DataObjects/test/MDGridBoxTest.h
index 341b1c301cc613c65eb1c888317b158f7c142386..e4a9b27cf5a996529a8c77d8cbda68ddf21e5c63 100644
--- a/Framework/DataObjects/test/MDGridBoxTest.h
+++ b/Framework/DataObjects/test/MDGridBoxTest.h
@@ -47,12 +47,12 @@ private:
     MockMDBox()
         : MDBox<MDLeanEvent<1>, 1>(new API::BoxController(1)),
           pBC(MDBox<MDLeanEvent<1>, 1>::getBoxController()) {}
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD0(getIsMasked, bool());
     MOCK_METHOD0(mask, void());
     MOCK_METHOD0(unmask, void());
     ~MockMDBox() override { delete pBC; }
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 
   // the sp to a box controller used as general reference to all tested
diff --git a/Framework/DataObjects/test/MockObjects.h b/Framework/DataObjects/test/MockObjects.h
index d1f7b2ec458bc96846e2b9f875b667dedcaab9f8..d6ad2d234327d89739b209db7e4f17e29a1a1332 100644
--- a/Framework/DataObjects/test/MockObjects.h
+++ b/Framework/DataObjects/test/MockObjects.h
@@ -10,7 +10,7 @@
 namespace Mantid {
 namespace DataObjects {
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockPeakShapeFactory : public PeakShapeFactory {
 public:
@@ -37,6 +37,6 @@ public:
 }
 }
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif /* MOCKOBJECTS_H_ */
diff --git a/Framework/Geometry/src/Objects/RuleItems.cpp b/Framework/Geometry/src/Objects/RuleItems.cpp
index bba6e3ff57a912c54a2f12f5f173bd30b45827d0..74aba2ceee5f18ea72a91cd0003103b87087b490 100644
--- a/Framework/Geometry/src/Objects/RuleItems.cpp
+++ b/Framework/Geometry/src/Objects/RuleItems.cpp
@@ -34,14 +34,14 @@
 #endif
 
 #include "MantidKernel/WarningSuppressions.h"
-DIAG_OFF("conversion")
-DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("conversion")
+GNU_DIAG_OFF("cast-qual")
 #include <TopoDS_Shape.hxx>
 #include <BRepAlgoAPI_Common.hxx>
 #include <BRepAlgoAPI_Fuse.hxx>
 #include <BRepPrimAPI_MakeBox.hxx>
-DIAG_ON("conversion")
-DIAG_ON("cast-qual")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("cast-qual")
 #endif
 
 namespace Mantid {
diff --git a/Framework/Geometry/src/Rendering/GeometryTriangulator.cpp b/Framework/Geometry/src/Rendering/GeometryTriangulator.cpp
index 2b6a94ac185c6c16076ae505fe70d4f7cda28786..856a5d59772870ca4ce4fb68ab8382faeb298451 100644
--- a/Framework/Geometry/src/Rendering/GeometryTriangulator.cpp
+++ b/Framework/Geometry/src/Rendering/GeometryTriangulator.cpp
@@ -23,8 +23,8 @@
 #endif
 #endif
 
-DIAG_OFF("conversion")
-DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("conversion")
+GNU_DIAG_OFF("cast-qual")
 
 #include <gp_Trsf.hxx>
 #include <gp_Pnt.hxx>
@@ -38,8 +38,8 @@ DIAG_OFF("cast-qual")
 #include <BRepBuilderAPI_Transform.hxx>
 #include <BRep_Tool.hxx>
 #include <Poly_Triangulation.hxx>
-DIAG_ON("conversion")
-DIAG_ON("cast-qual")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("cast-qual")
 
 #ifdef __INTEL_COMPILER
 #pragma warning enable 191
diff --git a/Framework/Geometry/src/Rendering/RenderingHelpers.cpp b/Framework/Geometry/src/Rendering/RenderingHelpers.cpp
index 7ad0c3ddcb8bb8b6d5353bd048f19457d9e9c04d..7e57d355fe8256003cd9b57dda5f460c62576122 100644
--- a/Framework/Geometry/src/Rendering/RenderingHelpers.cpp
+++ b/Framework/Geometry/src/Rendering/RenderingHelpers.cpp
@@ -28,8 +28,8 @@
 #endif
 #endif
 
-DIAG_OFF("conversion")
-DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("conversion")
+GNU_DIAG_OFF("cast-qual")
 
 #include <gp_Pnt.hxx>
 #include <TopoDS.hxx>
@@ -40,8 +40,8 @@ DIAG_OFF("cast-qual")
 #include <Poly_Array1OfTriangle.hxx>
 #include <TColgp_Array1OfPnt.hxx>
 #include <Poly_Triangulation.hxx>
-DIAG_ON("conversion")
-DIAG_ON("cast-qual")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("cast-qual")
 
 #ifdef __INTEL_COMPILER
 #pragma warning enable 191
diff --git a/Framework/Geometry/src/Surfaces/Cone.cpp b/Framework/Geometry/src/Surfaces/Cone.cpp
index 802b609219351b563827a155f93722130846c80e..ae6e39561714156df6b81f45ece57169e1a1ed9d 100644
--- a/Framework/Geometry/src/Surfaces/Cone.cpp
+++ b/Framework/Geometry/src/Surfaces/Cone.cpp
@@ -30,11 +30,11 @@
 #endif
 
 #include "MantidKernel/WarningSuppressions.h"
-DIAG_OFF("conversion")
-DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("conversion")
+GNU_DIAG_OFF("cast-qual")
 #include <BRepPrimAPI_MakeCone.hxx>
-DIAG_ON("conversion")
-DIAG_ON("cast-qual")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("cast-qual")
 #endif
 
 namespace Mantid {
diff --git a/Framework/Geometry/src/Surfaces/Cylinder.cpp b/Framework/Geometry/src/Surfaces/Cylinder.cpp
index f65ea3b17dafd414073f33283df9c4cbcdb51ca1..a7c90720f2d1bfd4d6657828e4cd89463fb8ed8f 100644
--- a/Framework/Geometry/src/Surfaces/Cylinder.cpp
+++ b/Framework/Geometry/src/Surfaces/Cylinder.cpp
@@ -16,11 +16,11 @@
 #endif
 
 #include "MantidKernel/WarningSuppressions.h"
-DIAG_OFF("conversion")
-DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("conversion")
+GNU_DIAG_OFF("cast-qual")
 #include <BRepPrimAPI_MakeCylinder.hxx>
-DIAG_ON("conversion")
-DIAG_ON("cast-qual")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("cast-qual")
 #endif
 
 namespace Mantid {
diff --git a/Framework/Geometry/src/Surfaces/Plane.cpp b/Framework/Geometry/src/Surfaces/Plane.cpp
index aebf83dc5d67ca479ce7d7d9dddafb42fcc2b713..dbb6649c4398e6d1d28cbd337e7ed02c6e02d795 100644
--- a/Framework/Geometry/src/Surfaces/Plane.cpp
+++ b/Framework/Geometry/src/Surfaces/Plane.cpp
@@ -17,15 +17,15 @@
 #endif
 
 #include "MantidKernel/WarningSuppressions.h"
-DIAG_OFF("conversion")
-DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("conversion")
+GNU_DIAG_OFF("cast-qual")
 #include <BRepPrimAPI_MakeBox.hxx>
 #include <BRepBuilderAPI_MakeFace.hxx>
 #include <BRepPrimAPI_MakeHalfSpace.hxx>
 #include <BRepAlgoAPI_Common.hxx>
 #include <gp_Pln.hxx>
-DIAG_ON("conversion")
-DIAG_ON("cast-qual")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("cast-qual")
 #endif
 
 namespace Mantid {
diff --git a/Framework/Geometry/src/Surfaces/Sphere.cpp b/Framework/Geometry/src/Surfaces/Sphere.cpp
index 4269d6abecfa9fb770c0498124e9de559b0c97ca..9c8affe4ba006c7f9c6a42047bbb0b0380ad3a09 100644
--- a/Framework/Geometry/src/Surfaces/Sphere.cpp
+++ b/Framework/Geometry/src/Surfaces/Sphere.cpp
@@ -14,11 +14,11 @@
 #endif
 
 #include "MantidKernel/WarningSuppressions.h"
-DIAG_OFF("conversion")
-DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("conversion")
+GNU_DIAG_OFF("cast-qual")
 #include <BRepPrimAPI_MakeSphere.hxx>
-DIAG_ON("conversion")
-DIAG_ON("cast-qual")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("cast-qual")
 #endif
 
 namespace Mantid {
diff --git a/Framework/Geometry/src/Surfaces/Surface.cpp b/Framework/Geometry/src/Surfaces/Surface.cpp
index 292a82119d6c74cafaaf078f4f49719c6e44c013..4b70842183c7e53013840f976a6adf066accbaca 100644
--- a/Framework/Geometry/src/Surfaces/Surface.cpp
+++ b/Framework/Geometry/src/Surfaces/Surface.cpp
@@ -29,11 +29,11 @@
 #endif
 
 #include "MantidKernel/WarningSuppressions.h"
-DIAG_OFF("conversion")
-DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("conversion")
+GNU_DIAG_OFF("cast-qual")
 #include <TopoDS_Shape.hxx>
-DIAG_ON("conversion")
-DIAG_ON("cast-qual")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("cast-qual")
 #endif
 
 namespace Mantid {
diff --git a/Framework/Geometry/src/Surfaces/Torus.cpp b/Framework/Geometry/src/Surfaces/Torus.cpp
index 635f7b1c51aea7fb29e2001ce2e9d444f9d8f351..a7c2941fe9f1d13327d11e3746ecd69c058b42b4 100644
--- a/Framework/Geometry/src/Surfaces/Torus.cpp
+++ b/Framework/Geometry/src/Surfaces/Torus.cpp
@@ -29,11 +29,11 @@
 #endif
 
 #include "MantidKernel/WarningSuppressions.h"
-DIAG_OFF("conversion")
-DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("conversion")
+GNU_DIAG_OFF("cast-qual")
 #include <TopoDS_Shape.hxx>
-DIAG_ON("conversion")
-DIAG_ON("cast-qual")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("cast-qual")
 #endif
 
 namespace Mantid {
diff --git a/Framework/Geometry/test/BasicHKLFiltersTest.h b/Framework/Geometry/test/BasicHKLFiltersTest.h
index 3b5a550e70ae92d818123078d0e943b28e59bd3c..cbbbed5d2682719cb4c14ace3025c855dffb3924 100644
--- a/Framework/Geometry/test/BasicHKLFiltersTest.h
+++ b/Framework/Geometry/test/BasicHKLFiltersTest.h
@@ -136,7 +136,7 @@ public:
 
     TS_ASSERT(Mock::VerifyAndClearExpectations(mock.get()))
   }
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
 private:
   class MockStructureFactorCalculator : public StructureFactorCalculator {
   public:
@@ -144,5 +144,5 @@ private:
     MOCK_CONST_METHOD1(getFSquared, double(const V3D &));
   };
 };
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 #endif /* MANTID_GEOMETRY_BASICHKLFILTERSTEST_H_ */
diff --git a/Framework/Geometry/test/BraggScattererFactoryTest.h b/Framework/Geometry/test/BraggScattererFactoryTest.h
index 2586d2f8fd8df159588652388c7e810801cb51f2..4bcde09d5a1a983981656ef2a4996b446e377b89 100644
--- a/Framework/Geometry/test/BraggScattererFactoryTest.h
+++ b/Framework/Geometry/test/BraggScattererFactoryTest.h
@@ -56,10 +56,10 @@ private:
     ~MockScatterer() override {}
 
     std::string name() const override { return "MockScatterer"; }
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD0(clone, BraggScatterer_sptr());
     MOCK_CONST_METHOD1(calculateStructureFactor, StructureFactor(const V3D &));
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 };
 
diff --git a/Framework/Geometry/test/BraggScattererInCrystalStructureTest.h b/Framework/Geometry/test/BraggScattererInCrystalStructureTest.h
index 28147bf85b77504fd6a998152037512ca89d0c8d..ccde6e65a1e8adf7fb7f3b69cb331e7fdb25d285 100644
--- a/Framework/Geometry/test/BraggScattererInCrystalStructureTest.h
+++ b/Framework/Geometry/test/BraggScattererInCrystalStructureTest.h
@@ -112,12 +112,12 @@ private:
   public:
     MockBraggScatterer() : BraggScattererInCrystalStructure() {}
     ~MockBraggScatterer() override {}
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD0(name, std::string());
     MOCK_CONST_METHOD0(clone, BraggScatterer_sptr());
     MOCK_CONST_METHOD1(calculateStructureFactor, StructureFactor(const V3D &));
     MOCK_METHOD1(afterScattererPropertySet, void(const std::string &));
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 };
 
diff --git a/Framework/Geometry/test/BraggScattererTest.h b/Framework/Geometry/test/BraggScattererTest.h
index f2b52ce9177b538cc72288fa9348425ca25da1f0..20737755f9878c95ebdfe23521aa850a030edb33 100644
--- a/Framework/Geometry/test/BraggScattererTest.h
+++ b/Framework/Geometry/test/BraggScattererTest.h
@@ -43,12 +43,12 @@ private:
 
   class MockBraggScatterer : public BraggScatterer {
   public:
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD0(name, std::string());
     MOCK_CONST_METHOD0(clone, BraggScatterer_sptr());
     MOCK_CONST_METHOD1(calculateStructureFactor, StructureFactor(const V3D &));
     MOCK_METHOD1(afterScattererPropertySet, void(const std::string &));
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 };
 
diff --git a/Framework/Geometry/test/CSGObjectTest.h b/Framework/Geometry/test/CSGObjectTest.h
index 0f7db17dcdd275ae95c717e4506a7a8303f422e9..3123e21b0167f35870aab04793fcf4cf2db9f606 100644
--- a/Framework/Geometry/test/CSGObjectTest.h
+++ b/Framework/Geometry/test/CSGObjectTest.h
@@ -45,7 +45,7 @@ namespace {
 // -----------------------------------------------------------------------------
 class MockRNG final : public Mantid::Kernel::PseudoRandomNumberGenerator {
 public:
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_METHOD0(nextValue, double());
   MOCK_METHOD2(nextValue, double(double, double));
   MOCK_METHOD2(nextInt, int(int, int));
@@ -56,7 +56,7 @@ public:
   MOCK_METHOD2(setRange, void(const double, const double));
   MOCK_CONST_METHOD0(min, double());
   MOCK_CONST_METHOD0(max, double());
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 }
 
diff --git a/Framework/Geometry/test/CompositeImplicitFunctionTest.h b/Framework/Geometry/test/CompositeImplicitFunctionTest.h
index 5ddd3d87ef36f5b291b6b3c4237e995161b1f454..2aee63b3d8fcdf56b35dd0937f75df577e71ab8c 100644
--- a/Framework/Geometry/test/CompositeImplicitFunctionTest.h
+++ b/Framework/Geometry/test/CompositeImplicitFunctionTest.h
@@ -18,11 +18,11 @@ private:
   // composite.
   class MockImplicitFunction : public Mantid::Geometry::MDImplicitFunction {
   public:
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD0(toXMLString, std::string());
     MOCK_CONST_METHOD0(getName, std::string());
     MOCK_METHOD1(isPointContained, bool(const Mantid::coord_t *coords));
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
     bool isPointContained(const std::vector<Mantid::coord_t> &) override {
       return true;
     }
diff --git a/Framework/Geometry/test/GroupTest.h b/Framework/Geometry/test/GroupTest.h
index 6ba6f52de0d72e7bdc94c3de9af637ec82999712..227a5c50dc797b0291498d9f6aba23fa5f924531 100644
--- a/Framework/Geometry/test/GroupTest.h
+++ b/Framework/Geometry/test/GroupTest.h
@@ -369,10 +369,10 @@ public:
 
     TS_ASSERT_THROWS(null * null, std::invalid_argument);
     // clang gives a warning if we don't use the result
-    DIAG_OFF("unused-comparison")
+    GNU_DIAG_OFF("unused-comparison")
     TS_ASSERT_THROWS(null == null, std::invalid_argument);
     TS_ASSERT_THROWS(null != null, std::invalid_argument);
-    DIAG_ON("unused-comparison")
+    GNU_DIAG_ON("unused-comparison")
     TS_ASSERT_THROWS(three * null, std::invalid_argument);
     TS_ASSERT_THROWS(null * three, std::invalid_argument);
 
diff --git a/Framework/Geometry/test/HKLFilterTest.h b/Framework/Geometry/test/HKLFilterTest.h
index d73a4cabe7875326a6d005ef72a256a7986170d1..0fb0197ce62df40afd36ae24988da1e8454739eb 100644
--- a/Framework/Geometry/test/HKLFilterTest.h
+++ b/Framework/Geometry/test/HKLFilterTest.h
@@ -184,7 +184,7 @@ public:
     TS_ASSERT_EQUALS(orFilterCasted->getLHS(), lhs);
     TS_ASSERT_EQUALS(orFilterCasted->getRHS(), rhs);
   }
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
 private:
   class MockHKLFilter : public HKLFilter {
   public:
@@ -212,5 +212,5 @@ private:
     MOCK_CONST_METHOD1(isAllowed, bool(const V3D &));
   };
 };
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 #endif /* MANTID_GEOMETRY_HKLFILTERTEST_H_ */
diff --git a/Framework/Geometry/test/InstrumentDefinitionParserTest.h b/Framework/Geometry/test/InstrumentDefinitionParserTest.h
index f5ccd58a921b66a11478035ad59c61680e0a05a5..37e57c0bf2ecbb4e2bd3140bd83ef60c50072d98 100644
--- a/Framework/Geometry/test/InstrumentDefinitionParserTest.h
+++ b/Framework/Geometry/test/InstrumentDefinitionParserTest.h
@@ -22,7 +22,7 @@ using namespace testing;
 using ScopedFileHelper::ScopedFile;
 
 class InstrumentDefinitionParserTest : public CxxTest::TestSuite {
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
 private:
   /// Mock Type to act as IDF files.
   class MockIDFObject : public Mantid::Geometry::IDFObject {
@@ -40,7 +40,7 @@ private:
     MOCK_CONST_METHOD0(exists, bool());
     MOCK_CONST_METHOD0(getParentDirectory, const Poco::Path());
   };
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
   /**
   Helper type to pass around related IDF environment information in a
   collection.
diff --git a/Framework/Geometry/test/MDGeometryXMLBuilderTest.h b/Framework/Geometry/test/MDGeometryXMLBuilderTest.h
index 86d9b8c26ebbf23d489156e7e461486a5b10030e..c51aec9e7693d35b6f005ce8aad34c193a8000c7 100644
--- a/Framework/Geometry/test/MDGeometryXMLBuilderTest.h
+++ b/Framework/Geometry/test/MDGeometryXMLBuilderTest.h
@@ -34,7 +34,7 @@ private:
   /// dependency.
   class MockIMDDimension : public Mantid::Geometry::IMDDimension {
   public:
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD0(getName, std::string());
     MOCK_CONST_METHOD0(getUnits, const Mantid::Kernel::UnitLabel());
     MOCK_CONST_METHOD0(getDimensionId, const std::string &());
@@ -48,7 +48,7 @@ private:
     MOCK_METHOD3(setRange, void(size_t nBins, coord_t min, coord_t max));
     MOCK_CONST_METHOD0(getMDUnits, const Kernel::MDUnit &());
     MOCK_CONST_METHOD0(getMDFrame, const Geometry::MDFrame &());
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 
   static std::string createDimensionXMLString(unsigned int nbins, int min,
diff --git a/Framework/Geometry/test/MeshObjectTest.h b/Framework/Geometry/test/MeshObjectTest.h
index 2115f7de14bbbef97f985d568bf07b08584fc2a4..749a33356224798d76e34c8110dd65771eaa0eae 100644
--- a/Framework/Geometry/test/MeshObjectTest.h
+++ b/Framework/Geometry/test/MeshObjectTest.h
@@ -37,7 +37,7 @@ namespace {
 // -----------------------------------------------------------------------------
 class MockRNG final : public Mantid::Kernel::PseudoRandomNumberGenerator {
 public:
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_METHOD0(nextValue, double());
   MOCK_METHOD2(nextValue, double(double, double));
   MOCK_METHOD2(nextInt, int(int, int));
@@ -48,7 +48,7 @@ public:
   MOCK_METHOD2(setRange, void(const double, const double));
   MOCK_CONST_METHOD0(min, double());
   MOCK_CONST_METHOD0(max, double());
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 
 std::unique_ptr<MeshObject> createCube(const double size, const V3D &centre) {
diff --git a/Framework/Geometry/test/MockObjects.h b/Framework/Geometry/test/MockObjects.h
index 5635147723c43e6751ca14fe00e28765f2ba33fb..0d29adcaf140f608ba8dbfb98ae1934b54ff020e 100644
--- a/Framework/Geometry/test/MockObjects.h
+++ b/Framework/Geometry/test/MockObjects.h
@@ -23,7 +23,7 @@ using boost::regex;
 
 namespace {
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 /*------------------------------------------------------------
  Mock Peak Transform
@@ -121,5 +121,5 @@ public:
   MOCK_CONST_METHOD0(getPeakShape, const Mantid::Geometry::PeakShape &());
 };
 }
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 #endif /* MANTIDGEOMETRYTEST_MOCKOBJECTS_H_ */
diff --git a/Framework/Geometry/test/PeakTransformSelectorTest.h b/Framework/Geometry/test/PeakTransformSelectorTest.h
index cef3d4ee33810dc53fdacdce80885eed1d11cdc4..375d70f96237869bf1f9703a634bc8560685e7c2 100644
--- a/Framework/Geometry/test/PeakTransformSelectorTest.h
+++ b/Framework/Geometry/test/PeakTransformSelectorTest.h
@@ -23,12 +23,12 @@ private:
     enum { value = I };
 
   public:
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD0(createDefaultTransform, PeakTransform_sptr());
     MOCK_CONST_METHOD2(createTransform,
                        PeakTransform_sptr(const std::string &,
                                           const std::string &));
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 
   using MockPeakTransformFactory = MockPeakTransformFactoryType<0>;
diff --git a/Framework/Geometry/test/SampleEnvironmentTest.h b/Framework/Geometry/test/SampleEnvironmentTest.h
index aa4f0922f1f3d7f6a188ed1ed55c794d6c7519fc..e5c81c552fa5182cd2ad7c7642cf14fd3d69c20c 100644
--- a/Framework/Geometry/test/SampleEnvironmentTest.h
+++ b/Framework/Geometry/test/SampleEnvironmentTest.h
@@ -21,7 +21,7 @@ namespace {
 // -----------------------------------------------------------------------------
 class MockRNG final : public Mantid::Kernel::PseudoRandomNumberGenerator {
 public:
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_METHOD0(nextValue, double());
   MOCK_METHOD2(nextValue, double(double, double));
   MOCK_METHOD2(nextInt, int(int, int));
@@ -32,7 +32,7 @@ public:
   MOCK_METHOD2(setRange, void(const double, const double));
   MOCK_CONST_METHOD0(min, double());
   MOCK_CONST_METHOD0(max, double());
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 }
 
diff --git a/Framework/Geometry/test/SpaceGroupFactoryTest.h b/Framework/Geometry/test/SpaceGroupFactoryTest.h
index a4e5974ddeab878ff119547082b446f07bc18b6c..7bfb4bf5e4075812bdc629372fc22ba21047f963 100644
--- a/Framework/Geometry/test/SpaceGroupFactoryTest.h
+++ b/Framework/Geometry/test/SpaceGroupFactoryTest.h
@@ -398,9 +398,9 @@ private:
     MockSpaceGroupGenerator(size_t number, const std::string &hmSymbol,
                             const std::string &generatorInformation)
         : AbstractSpaceGroupGenerator(number, hmSymbol, generatorInformation) {}
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD0(generateGroup, Group_const_sptr());
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 
   /* Testing TransformationSpaceGroupGenerator is a bit hard in the sense that
diff --git a/Framework/Geometry/test/StructureFactorCalculatorTest.h b/Framework/Geometry/test/StructureFactorCalculatorTest.h
index 225a1a9eb3db12340bc6cca616b69217617acf8c..374826b40ec945c47352926a3e18e5bbbc733539 100644
--- a/Framework/Geometry/test/StructureFactorCalculatorTest.h
+++ b/Framework/Geometry/test/StructureFactorCalculatorTest.h
@@ -99,11 +99,11 @@ private:
    */
   class MockStructureFactorCalculator : public StructureFactorCalculator {
   public:
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD1(getF, StructureFactor(const V3D &hkl));
     MOCK_METHOD1(crystalStructureSetHook,
                  void(const CrystalStructure &crystalStructure));
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 };
 
diff --git a/Framework/Geometry/test/SymmetryElementFactoryTest.h b/Framework/Geometry/test/SymmetryElementFactoryTest.h
index d7e9c4d2f91e7c7cf148821e25ada10abbca1440..9fcd9c7e9e8b13048b461aa716059d9a18c49c88 100644
--- a/Framework/Geometry/test/SymmetryElementFactoryTest.h
+++ b/Framework/Geometry/test/SymmetryElementFactoryTest.h
@@ -396,12 +396,12 @@ private:
   class TestableSymmetryElementWithAxisGenerator
       : public SymmetryElementWithAxisGenerator {
     friend class SymmetryElementFactoryTest;
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD1(generateElement,
                        SymmetryElement_sptr(const SymmetryOperation &));
     MOCK_CONST_METHOD1(canProcess, bool(const SymmetryOperation &));
     MOCK_CONST_METHOD1(determineSymbol, std::string(const SymmetryOperation &));
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 
   class TestableSymmetryElementRotationGenerator
diff --git a/Framework/Geometry/test/SymmetryElementTest.h b/Framework/Geometry/test/SymmetryElementTest.h
index 7f3097507ee94e918e2f450c4beca595a2b2f863..c1f19275f8496e5acf0716d15b235024da85bcbd 100644
--- a/Framework/Geometry/test/SymmetryElementTest.h
+++ b/Framework/Geometry/test/SymmetryElementTest.h
@@ -159,7 +159,7 @@ public:
 private:
   class MockSymmetryElement : public SymmetryElement {
     friend class SymmetryElementTest;
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
   public:
     MockSymmetryElement(const std::string &hmSymbol)
         : SymmetryElement(hmSymbol) {}
@@ -175,7 +175,7 @@ private:
         : SymmetryElementWithAxis(symbol, axis, translation) {}
     MOCK_CONST_METHOD0(clone, SymmetryElement_sptr());
   };
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 
 #endif /* MANTID_GEOMETRY_SYMMETRYELEMENTTEST_H_ */
diff --git a/Framework/ICat/src/CatalogSearch.cpp b/Framework/ICat/src/CatalogSearch.cpp
index fd37dcbf960686fb0c941666d6c7a42622fe7c91..4a7c07638678226655fa038c4120c3a7150f7b0a 100644
--- a/Framework/ICat/src/CatalogSearch.cpp
+++ b/Framework/ICat/src/CatalogSearch.cpp
@@ -1,9 +1,9 @@
 #if GCC_VERSION >= 40800 // 4.8.0
-DIAG_OFF("literal-suffix")
+GNU_DIAG_OFF("literal-suffix")
 #endif
 #include "MantidICat/CatalogSearch.h"
 #if GCC_VERSION >= 40800 // 4.8.0
-DIAG_ON("literal-suffix")
+GNU_DIAG_ON("literal-suffix")
 #endif
 
 #include "MantidAPI/CatalogManager.h"
diff --git a/Framework/ICat/src/GSoap.cpp b/Framework/ICat/src/GSoap.cpp
index 151efa097ae4735c4d32f4787a1e850c53008740..5f08fd4e909d90d9bc46f51ed7b6c81a22775253 100644
--- a/Framework/ICat/src/GSoap.cpp
+++ b/Framework/ICat/src/GSoap.cpp
@@ -4,14 +4,14 @@
 // disable some warnings that we understand but do not want to touch as
 // it is automatically generated code
 //------------------------------------------------------------------------------
-DIAG_OFF("cast-qual")
-DIAG_OFF("conversion")
-DIAG_OFF("unused-parameter")
-DIAG_OFF("strict-aliasing")
-DIAG_OFF("format")
-DIAG_OFF("vla")
+GNU_DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("conversion")
+GNU_DIAG_OFF("unused-parameter")
+GNU_DIAG_OFF("strict-aliasing")
+GNU_DIAG_OFF("format")
+GNU_DIAG_OFF("vla")
 #if GCC_VERSION >= 40800 // 4.8.0
-DIAG_OFF("literal-suffix")
+GNU_DIAG_OFF("literal-suffix")
 #endif
 #ifdef _WIN32
 #pragma warning(disable : 4100)
diff --git a/Framework/ICat/src/GSoap/stdsoap2.cpp b/Framework/ICat/src/GSoap/stdsoap2.cpp
index 881154361b02c2b1c070d66eda97f6585c347b92..7b0a085a45f1e438e3ee0fe25f85df48b093df1c 100644
--- a/Framework/ICat/src/GSoap/stdsoap2.cpp
+++ b/Framework/ICat/src/GSoap/stdsoap2.cpp
@@ -3,11 +3,11 @@
 // ignore warnings in gSOAP
 // Long-term solution is to use gSOAP as an external library or external
 // project. see issue #19433
-DIAG_OFF("deprecated-declarations")
-DIAG_OFF("format-overflow")
-DIAG_OFF("format-truncation")
-DIAG_OFF("implicit-fallthrough")
-DIAG_OFF("cast-align")
+GNU_DIAG_OFF("deprecated-declarations")
+GNU_DIAG_OFF("format-overflow")
+GNU_DIAG_OFF("format-truncation")
+GNU_DIAG_OFF("implicit-fallthrough")
+GNU_DIAG_OFF("cast-align")
 
 /*
   stdsoap2.c[pp] 2.8.15
@@ -17014,8 +17014,8 @@ soap::~soap() {
 
 /******************************************************************************/
 
-DIAG_ON("deprecated-declarations")
-DIAG_ON("format-overflow")
-DIAG_ON("format-truncation")
-DIAG_ON("implicit-fallthrough")
-DIAG_ON("cast-align")
+GNU_DIAG_ON("deprecated-declarations")
+GNU_DIAG_ON("format-overflow")
+GNU_DIAG_ON("format-truncation")
+GNU_DIAG_ON("implicit-fallthrough")
+GNU_DIAG_ON("cast-align")
diff --git a/Framework/ICat/src/ICat3/ICat3GSoapGenerated.cpp b/Framework/ICat/src/ICat3/ICat3GSoapGenerated.cpp
index 63220d9b864e915118c4b83968a3f1953e865687..3280d01c366bdf222061e51b3f837117d726aa6e 100644
--- a/Framework/ICat/src/ICat3/ICat3GSoapGenerated.cpp
+++ b/Framework/ICat/src/ICat3/ICat3GSoapGenerated.cpp
@@ -4,14 +4,14 @@
 // disable some warnings that we understand but do not want to touch as
 // it is automatically generated code
 //------------------------------------------------------------------------------
-DIAG_OFF("cast-qual")
-DIAG_OFF("conversion")
-DIAG_OFF("unused-parameter")
-DIAG_OFF("strict-aliasing")
-DIAG_OFF("format")
-DIAG_OFF("vla")
+GNU_DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("conversion")
+GNU_DIAG_OFF("unused-parameter")
+GNU_DIAG_OFF("strict-aliasing")
+GNU_DIAG_OFF("format")
+GNU_DIAG_OFF("vla")
 #if GCC_VERSION >= 40800 // 4.8.0
-DIAG_OFF("literal-suffix")
+GNU_DIAG_OFF("literal-suffix")
 #endif
 #ifdef _WIN32
 #pragma warning(disable : 4100)
diff --git a/Framework/ICat/src/ICat3/ICat3Helper.cpp b/Framework/ICat/src/ICat3/ICat3Helper.cpp
index b62a57971b46c3b1cef5d0b6f3415455f76f8d93..a671d52b33581b4348fe8776c446a00f0fd8fd4f 100644
--- a/Framework/ICat/src/ICat3/ICat3Helper.cpp
+++ b/Framework/ICat/src/ICat3/ICat3Helper.cpp
@@ -2,7 +2,7 @@
 // Poco-related compilation error on Windows
 #include "MantidAPI/WorkspaceFactory.h"
 #if GCC_VERSION >= 40800 // 4.8.0
-DIAG_OFF("literal-suffix")
+GNU_DIAG_OFF("literal-suffix")
 #endif
 #include "MantidICat/ICat3/ICat3Helper.h"
 #include "MantidICat/ICat3/ICat3ErrorHandling.h"
diff --git a/Framework/ICat/src/ICat4/ICat4GSoapGenerated.cpp b/Framework/ICat/src/ICat4/ICat4GSoapGenerated.cpp
index c60417c89a94b2c840fb4ba43dc6c89881c6b35d..088d62d06424b84ad0a77d9a31337bc4453d72d9 100644
--- a/Framework/ICat/src/ICat4/ICat4GSoapGenerated.cpp
+++ b/Framework/ICat/src/ICat4/ICat4GSoapGenerated.cpp
@@ -4,14 +4,14 @@
 // disable some warnings that we understand but do not want to touch as
 // it is automatically generated code
 //------------------------------------------------------------------------------
-DIAG_OFF("cast-qual")
-DIAG_OFF("conversion")
-DIAG_OFF("unused-parameter")
-DIAG_OFF("strict-aliasing")
-DIAG_OFF("format")
-DIAG_OFF("vla")
+GNU_DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("conversion")
+GNU_DIAG_OFF("unused-parameter")
+GNU_DIAG_OFF("strict-aliasing")
+GNU_DIAG_OFF("format")
+GNU_DIAG_OFF("vla")
 #if GCC_VERSION >= 40800 // 4.8.0
-DIAG_OFF("literal-suffix")
+GNU_DIAG_OFF("literal-suffix")
 #endif
 #ifdef _WIN32
 #pragma warning(disable : 4100)
diff --git a/Framework/Kernel/inc/MantidKernel/PropertyHelper.h b/Framework/Kernel/inc/MantidKernel/PropertyHelper.h
index 497361ba5c118c2ad6029e3c6f24584080595d08..be31d63d9bf528ffb2bbf78715910e3270b06254 100644
--- a/Framework/Kernel/inc/MantidKernel/PropertyHelper.h
+++ b/Framework/Kernel/inc/MantidKernel/PropertyHelper.h
@@ -124,7 +124,7 @@ std::string toPrettyString(
   }
   return Strings::shorten(retVal, maxLength);
 }
-DIAG_OFF("unused-function")
+GNU_DIAG_OFF("unused-function")
 /** Explicit specialization for a property of type std::vector<bool>.
 *   This will catch Vectors of char, double, float etc.
 *   This simply concatenates the values using a delimiter
@@ -139,7 +139,7 @@ std::string toPrettyString(
   return Strings::shorten(Strings::join(value.begin(), value.end(), delimiter),
                           maxLength);
 }
-DIAG_ON("unused-function")
+GNU_DIAG_ON("unused-function")
 
 /// Specialization for a property of type std::vector<std::vector>.
 template <typename T>
diff --git a/Framework/Kernel/inc/MantidKernel/WarningSuppressions.h b/Framework/Kernel/inc/MantidKernel/WarningSuppressions.h
index 9a09737dcf85dc1ca24df6d70df8c8b59c9877f7..d84d5c689e03251e4b93b76f51dee25a974061bd 100644
--- a/Framework/Kernel/inc/MantidKernel/WarningSuppressions.h
+++ b/Framework/Kernel/inc/MantidKernel/WarningSuppressions.h
@@ -46,31 +46,31 @@
 #define PRAGMA(x) _Pragma(#x)
 
 // things to make the macros clearer
-#define DIAG_STR(s) #s
+#define GNU_DIAG_STR(s) #s
 // undefine definition from Poco 1.6
-#ifdef DIAG_JOINSTR
-#undef DIAG_JOINSTR
+#ifdef GNU_DIAG_JOINSTR
+#undef GNU_DIAG_JOINSTR
 #endif
-#define DIAG_JOINSTR(x, y) DIAG_STR(x##y)
-#define DIAG_MAKE_WARNING(x) "-W" x
+#define GNU_DIAG_JOINSTR(x, y) GNU_DIAG_STR(x##y)
+#define GNU_DIAG_MAKE_WARNING(x) "-W" x
 // undefine definition from Poco 1.6
-#ifdef DIAG_DO_PRAGMA
-#undef DIAG_DO_PRAGMA
+#ifdef GNU_DIAG_DO_PRAGMA
+#undef GNU_DIAG_DO_PRAGMA
 #endif
-#define DIAG_DO_PRAGMA(x) _Pragma(#x)
+#define GNU_DIAG_DO_PRAGMA(x) _Pragma(#x)
 
 #if defined(GCC_VERSION)
-#define DIAG_PRAGMA(x) DIAG_DO_PRAGMA(GCC diagnostic x)
+#define GNU_DIAG_PRAGMA(x) GNU_DIAG_DO_PRAGMA(GCC diagnostic x)
 #else
-#define DIAG_PRAGMA(x) DIAG_DO_PRAGMA(clang diagnostic x)
+#define GNU_DIAG_PRAGMA(x) GNU_DIAG_DO_PRAGMA(clang diagnostic x)
 #endif
 
 // the following were previously defined in Poco/Platform_POSIX.h
-#ifdef DIAG_ON
-#undef DIAG_ON
+#ifdef GNU_DIAG_ON
+#undef GNU_DIAG_ON
 #endif
-#ifdef DIAG_OFF
-#undef DIAG_OFF
+#ifdef GNU_DIAG_OFF
+#undef GNU_DIAG_OFF
 #endif
 
 #if defined(GCC_VERSION)
@@ -79,18 +79,18 @@
 // same macro for GCC and clang.
 // clang-format off
 #if GCC_VERSION >= 40600 // GCC 4.6.0
-#define DIAG_OFF(x)                                                          \
-  DIAG_PRAGMA(push)                                                          \
-  DIAG_PRAGMA(ignored DIAG_MAKE_WARNING("unknown-warning"))                     \
-  DIAG_PRAGMA(ignored DIAG_MAKE_WARNING(x))
-#define DIAG_ON(x) DIAG_PRAGMA(pop)
+#define GNU_DIAG_OFF(x)                                                          \
+  GNU_DIAG_PRAGMA(push)                                                          \
+  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING("unknown-warning"))                     \
+  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING(x))
+#define GNU_DIAG_ON(x) GNU_DIAG_PRAGMA(pop)
 #else
-#define DIAG_OFF(x)                                                          \
-  DIAG_PRAGMA(ignored DIAG_MAKE_WARNING("unknown-warning"))                     \
-  DIAG_PRAGMA(ignored DIAG_MAKE_WARNING(x))
-#define DIAG_ON(x)                                                           \
-  DIAG_PRAGMA(warning DIAG_MAKE_WARNING("unknown-warning"))                     \
-  DIAG_PRAGMA(warning DIAG_MAKE_WARNING(x))
+#define GNU_DIAG_OFF(x)                                                          \
+  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING("unknown-warning"))                     \
+  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING(x))
+#define GNU_DIAG_ON(x)                                                           \
+  GNU_DIAG_PRAGMA(warning GNU_DIAG_MAKE_WARNING("unknown-warning"))                     \
+  GNU_DIAG_PRAGMA(warning GNU_DIAG_MAKE_WARNING(x))
 #endif
 // clang-format on
 
@@ -99,16 +99,16 @@
 // note that we turn off unknown warnings here as well so that we can use the
 // same macro for GCC and clang.
 // clang-format off
-#define DIAG_OFF(x)                                                         \
-  DIAG_PRAGMA(push)                                                         \
-  DIAG_PRAGMA(ignored DIAG_MAKE_WARNING("unknown-warning-option"))        \
-  DIAG_PRAGMA(ignored DIAG_MAKE_WARNING(x))
-#define DIAG_ON(x) DIAG_PRAGMA(pop)
+#define GNU_DIAG_OFF(x)                                                         \
+  GNU_DIAG_PRAGMA(push)                                                         \
+  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING("unknown-warning-option"))        \
+  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING(x))
+#define GNU_DIAG_ON(x) GNU_DIAG_PRAGMA(pop)
 // clang-format on
 #else
 // neither clang or GCC
-#define DIAG_OFF(x)
-#define DIAG_ON(x)
+#define GNU_DIAG_OFF(x)
+#define GNU_DIAG_ON(x)
 #endif
 
 #endif
@@ -117,21 +117,21 @@
 // the hyphen and we use it in a lot of test files.
 // clang-format off
 #if defined(__cplusplus) && defined(GCC_VERSION) && GCC_VERSION >= 50000
-#define DIAG_OFF_SUGGEST_OVERRIDE DIAG_OFF("suggest-override")
-#define DIAG_ON_SUGGEST_OVERRIDE DIAG_ON("suggest-override")
+#define GNU_DIAG_OFF_SUGGEST_OVERRIDE GNU_DIAG_OFF("suggest-override")
+#define GNU_DIAG_ON_SUGGEST_OVERRIDE GNU_DIAG_ON("suggest-override")
 #elif defined(__cplusplus) && defined(CLANG_VERSION) && CLANG_VERSION >= 306
-#define DIAG_OFF_SUGGEST_OVERRIDE DIAG_OFF("inconsistent-missing-override")
-#define DIAG_ON_SUGGEST_OVERRIDE DIAG_ON("inconsistent-missing-override")
+#define GNU_DIAG_OFF_SUGGEST_OVERRIDE GNU_DIAG_OFF("inconsistent-missing-override")
+#define GNU_DIAG_ON_SUGGEST_OVERRIDE GNU_DIAG_ON("inconsistent-missing-override")
 #else
-#define DIAG_OFF_SUGGEST_OVERRIDE
-#define DIAG_ON_SUGGEST_OVERRIDE
+#define GNU_DIAG_OFF_SUGGEST_OVERRIDE
+#define GNU_DIAG_ON_SUGGEST_OVERRIDE
 #endif
 // clang-format on
 
 #if defined(GCC_VERSION) || defined(CLANG_VERSION)
-#define UNUSED_FUNCTION __attribute__((unused))
+#define GNU_UNUSED_FUNCTION __attribute__((unused))
 #else
-#define UNUSED_FUNCTION
+#define GNU_UNUSED_FUNCTION
 #endif
 
 #endif /*MANTID_KERNEL_WARNINGSUPPRESSIONS_H_*/
diff --git a/Framework/Kernel/inc/MantidKernel/normal_distribution.h b/Framework/Kernel/inc/MantidKernel/normal_distribution.h
index 206137705bd55a2bc9054b3850fe7adf67b5035f..948303b220f7d4a65291831e0795f75c5d9c6bb8 100644
--- a/Framework/Kernel/inc/MantidKernel/normal_distribution.h
+++ b/Framework/Kernel/inc/MantidKernel/normal_distribution.h
@@ -170,7 +170,7 @@ public:
              normal_distribution<_RT> &__x);
 };
 
-DIAG_OFF("maybe-uninitialized")
+GNU_DIAG_OFF("maybe-uninitialized")
 template <class _RealType>
 template <class _URNG>
 _RealType normal_distribution<_RealType>::operator()(_URNG &__g,
@@ -196,7 +196,7 @@ _RealType normal_distribution<_RealType>::operator()(_URNG &__g,
   }
   return _Up * __p.stddev() + __p.mean();
 }
-DIAG_ON("maybe-uninitialized")
+GNU_DIAG_ON("maybe-uninitialized")
 
 template <class _CharT, class _Traits, class _RT>
 std::basic_ostream<_CharT, _Traits> &
diff --git a/Framework/Kernel/test/MDUnitFactoryTest.h b/Framework/Kernel/test/MDUnitFactoryTest.h
index a6f16cd77f02a7c0316ac3f36ca5b8c53bdf78c9..194dbdb6644a79da23c89e19044dee2b5116faaa 100644
--- a/Framework/Kernel/test/MDUnitFactoryTest.h
+++ b/Framework/Kernel/test/MDUnitFactoryTest.h
@@ -14,7 +14,7 @@ using namespace testing;
 /**
  * Helper Mock MDUnit
  */
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 class MockMDUnit : public MDUnit {
 public:
   MOCK_CONST_METHOD0(getUnitLabel, UnitLabel());
@@ -31,7 +31,7 @@ public:
   MOCK_CONST_METHOD1(createRaw, MDUnit *(const std::string &));
   MOCK_CONST_METHOD1(canInterpret, bool(const std::string &));
 };
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 class MDUnitFactoryTest : public CxxTest::TestSuite {
 public:
   // This pair of boilerplate methods prevent the suite being created statically
diff --git a/Framework/Kernel/test/NDRandomNumberGeneratorTest.h b/Framework/Kernel/test/NDRandomNumberGeneratorTest.h
index 521b4635c2a2a5bd0ac020505abe63d70bca9990..0ccc14b4f0e97e15c5d274703205e9ea1136ad7d 100644
--- a/Framework/Kernel/test/NDRandomNumberGeneratorTest.h
+++ b/Framework/Kernel/test/NDRandomNumberGeneratorTest.h
@@ -17,12 +17,12 @@ private:
   public:
     Mock3DRandomNumberGenerator()
         : Mantid::Kernel::NDRandomNumberGenerator(3) {}
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_METHOD0(generateNextPoint, void());
     MOCK_METHOD0(restart, void());
     MOCK_METHOD0(save, void());
     MOCK_METHOD0(restore, void());
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 
 public:
diff --git a/Framework/Kernel/test/UserCatalogInfoTest.h b/Framework/Kernel/test/UserCatalogInfoTest.h
index 64fcf75a3aa735413c6355a12062eb2b52736b01..1d02f7f67c6aa104c585d0812baeab4332f9de91 100644
--- a/Framework/Kernel/test/UserCatalogInfoTest.h
+++ b/Framework/Kernel/test/UserCatalogInfoTest.h
@@ -19,7 +19,7 @@ operator<<(std::basic_ostream<CharType, CharTrait> &out,
   return out;
 }
 }
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 using namespace Mantid::Kernel;
 class MockCatalogConfigService : public CatalogConfigService {
 public:
@@ -37,7 +37,7 @@ public:
   MOCK_CONST_METHOD0(linuxPrefix, const std::string());
   MOCK_CONST_METHOD0(clone, ICatalogInfo *());
 };
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 // Adaptee
 struct UserType {
   std::string getString(const std::string &) const { return "my_value"; }
diff --git a/Framework/LiveData/inc/MantidLiveData/ISIS/TCPEventStreamDefs.h b/Framework/LiveData/inc/MantidLiveData/ISIS/TCPEventStreamDefs.h
index a526e54eca77a9ca9f127fbfd6e77f5754eab664..fe99724b9ab820f6a86699c934fbc55e825b4d00 100644
--- a/Framework/LiveData/inc/MantidLiveData/ISIS/TCPEventStreamDefs.h
+++ b/Framework/LiveData/inc/MantidLiveData/ISIS/TCPEventStreamDefs.h
@@ -9,7 +9,7 @@
 #include <vector>
 
 // to ignore warnings when comparing header versions
-DIAG_OFF("type-limits")
+GNU_DIAG_OFF("type-limits")
 #if defined(_WIN32)
 #pragma warning(disable : 4296)
 #endif
@@ -51,7 +51,7 @@ struct TCPStreamEventHeader {
       : marker1(marker), marker2(marker), version(current_version),
         length(sizeof(TCPStreamEventHeader)), type(type_) {}
 
-  DIAG_OFF("tautological-compare")
+  GNU_DIAG_OFF("tautological-compare")
   bool isValid() const {
     return marker1 == marker && marker2 == marker &&
            length >= sizeof(TCPStreamEventHeader) &&
@@ -59,7 +59,7 @@ struct TCPStreamEventHeader {
            minorVersion() >= TCPStreamEventHeader::minor_version &&
            type != InvalidStream;
   }
-  DIAG_ON("tautological-compare")
+  GNU_DIAG_ON("tautological-compare")
 
   static const uint32_t major_version =
       1; ///< starts at 1, then incremented whenever layout of this or further
@@ -189,5 +189,5 @@ struct TCPStreamEventDataSE {
 }
 }
 
-DIAG_ON("type-limits")
+GNU_DIAG_ON("type-limits")
 #endif /* TCP_EVENT_STREAM_DEFS_H */
diff --git a/Framework/LiveData/src/ISIS/ISISHistoDataListener.cpp b/Framework/LiveData/src/ISIS/ISISHistoDataListener.cpp
index 52ae216ef92a01674ed4337dd133dfb8eb68b9f9..b593daa06cba84fd05f03ef7775c1639d86a27c5 100644
--- a/Framework/LiveData/src/ISIS/ISISHistoDataListener.cpp
+++ b/Framework/LiveData/src/ISIS/ISISHistoDataListener.cpp
@@ -21,7 +21,7 @@
 #ifdef GCC_VERSION
 // Avoid compiler warnings on gcc from unused static constants in
 // isisds_command.h
-DIAG_OFF("unused-variable")
+GNU_DIAG_OFF("unused-variable")
 #endif
 #include "DAE/idc.h"
 
diff --git a/Framework/LiveData/src/ISIS/ISISLiveEventDataListener.cpp b/Framework/LiveData/src/ISIS/ISISLiveEventDataListener.cpp
index 8911ed9bd8c830e42182fb729cfdc16e62837442..18c9a0f9520cd7902de467c8b1792bf39dace9d6 100644
--- a/Framework/LiveData/src/ISIS/ISISLiveEventDataListener.cpp
+++ b/Framework/LiveData/src/ISIS/ISISLiveEventDataListener.cpp
@@ -19,7 +19,7 @@
 #ifdef GCC_VERSION
 // Avoid compiler warnings on gcc from unused static constants in
 // isisds_command.h
-DIAG_OFF("unused-variable")
+GNU_DIAG_OFF("unused-variable")
 #endif
 #include "DAE/idc.h"
 
diff --git a/Framework/LiveData/src/Kafka/KafkaEventStreamDecoder.cpp b/Framework/LiveData/src/Kafka/KafkaEventStreamDecoder.cpp
index 5daea6c1e4b8ef262c255323bbd4314167e0b6fa..94b79b03173a291b3dfad836a34d5c1ad31e8e3c 100644
--- a/Framework/LiveData/src/Kafka/KafkaEventStreamDecoder.cpp
+++ b/Framework/LiveData/src/Kafka/KafkaEventStreamDecoder.cpp
@@ -14,13 +14,13 @@
 #include "MantidLiveData/Exception.h"
 #include "MantidLiveData/Kafka/KafkaTopicSubscriber.h"
 
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 #include "private/Schema/ba57_run_info_generated.h"
 #include "private/Schema/df12_det_spec_map_generated.h"
 #include "private/Schema/ev42_events_generated.h"
 #include "private/Schema/f142_logdata_generated.h"
 #include "private/Schema/is84_isis_events_generated.h"
-DIAG_ON("conversion")
+GNU_DIAG_ON("conversion")
 
 using namespace Mantid::Types;
 
diff --git a/Framework/LiveData/test/KafkaTesting.h b/Framework/LiveData/test/KafkaTesting.h
index 97bbfb17d5d6202b6405dd2c96b3ae76e4c2469f..fbb275537c17f876556b4eb2016af36da3fdc7e2 100644
--- a/Framework/LiveData/test/KafkaTesting.h
+++ b/Framework/LiveData/test/KafkaTesting.h
@@ -8,13 +8,13 @@
 #include "MantidTypes/Core/DateAndTime.h"
 #include <gmock/gmock.h>
 
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 #include "Kafka/private/Schema/ba57_run_info_generated.h"
 #include "Kafka/private/Schema/df12_det_spec_map_generated.h"
 #include "Kafka/private/Schema/ev42_events_generated.h"
 #include "Kafka/private/Schema/f142_logdata_generated.h"
 #include "Kafka/private/Schema/is84_isis_events_generated.h"
-DIAG_ON("conversion")
+GNU_DIAG_ON("conversion")
 
 #include <ctime>
 
@@ -29,7 +29,7 @@ public:
       std::unique_ptr<Mantid::LiveData::IKafkaStreamSubscriber>;
   using IKafkaStreamSubscriber_ptr = Mantid::LiveData::IKafkaStreamSubscriber *;
 
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   // GMock cannot mock non-copyable return types so we resort to a small
   // adapter method. Users have to use EXPECT_CALL(subscribe_) instead
   MOCK_CONST_METHOD2(subscribe_, IKafkaStreamSubscriber_ptr(
@@ -50,7 +50,7 @@ public:
     return std::unique_ptr<Mantid::LiveData::IKafkaStreamSubscriber>(
         this->subscribe_(s, offset, option));
   }
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 
 // -----------------------------------------------------------------------------
diff --git a/Framework/MDAlgorithms/src/LoadSQW2.cpp b/Framework/MDAlgorithms/src/LoadSQW2.cpp
index 68420602402ab32cc61b1951b955e82489117f20..427e434540dbb1cb6bf4d138793f591a08cb09a4 100644
--- a/Framework/MDAlgorithms/src/LoadSQW2.cpp
+++ b/Framework/MDAlgorithms/src/LoadSQW2.cpp
@@ -485,7 +485,7 @@ std::vector<float> LoadSQW2::calculateDimLimitsFromData() {
 
 // The missing braces warning is a false positive -
 // https://llvm.org/bugs/show_bug.cgi?id=21629
-DIAG_OFF("missing-braces")
+GNU_DIAG_OFF("missing-braces")
 /**
  * Create the Q MDHistoDimension for the output frame and given information
  * from the file
@@ -539,7 +539,7 @@ LoadSQW2::createQDimension(size_t index, float dimMin, float dimMax,
   return builder.create();
 }
 
-DIAG_ON("missing-braces")
+GNU_DIAG_ON("missing-braces")
 
 /**
  * Create an energy dimension
diff --git a/Framework/MDAlgorithms/test/BinMDTest.h b/Framework/MDAlgorithms/test/BinMDTest.h
index c2e46f0fc7c28080d4512f9b5df891e1e9476bff..9449af554426a33de1493b2c0fdbd2d95dd27e5b 100644
--- a/Framework/MDAlgorithms/test/BinMDTest.h
+++ b/Framework/MDAlgorithms/test/BinMDTest.h
@@ -34,7 +34,7 @@ using namespace Mantid::MDAlgorithms;
 using Mantid::coord_t;
 
 class BinMDTest : public CxxTest::TestSuite {
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
 private:
   // Helper class. Mock Implicit function.
   class MockImplicitFunction : public Mantid::Geometry::MDImplicitFunction {
@@ -45,7 +45,7 @@ private:
     std::string getName() const override { return "MockImplicitFunction"; }
     MOCK_CONST_METHOD0(toXMLString, std::string());
   };
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
   // Helper class. Builds mock implicit functions.
   class MockImplicitFunctionBuilder
       : public Mantid::API::ImplicitFunctionBuilder {
diff --git a/Framework/MDAlgorithms/test/BinaryOperationMDTest.h b/Framework/MDAlgorithms/test/BinaryOperationMDTest.h
index d3ea69b26bb490c267a36afa979dab74e301f0c1..9f6e1dd822df6b4e115b4b01c51ca9b0b1a39027 100644
--- a/Framework/MDAlgorithms/test/BinaryOperationMDTest.h
+++ b/Framework/MDAlgorithms/test/BinaryOperationMDTest.h
@@ -19,7 +19,7 @@ using namespace Mantid::DataObjects;
 using namespace Mantid::MDAlgorithms;
 using namespace testing;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockBinaryOperationMD : public BinaryOperationMD {
 public:
@@ -35,7 +35,7 @@ public:
            Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar));
   void exec() override { BinaryOperationMD::exec(); }
 };
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 class BinaryOperationMDTest : public CxxTest::TestSuite {
 public:
   // This pair of boilerplate methods prevent the suite being created statically
diff --git a/Framework/MDAlgorithms/test/BooleanBinaryOperationMDTest.h b/Framework/MDAlgorithms/test/BooleanBinaryOperationMDTest.h
index a29594e1afc86328bdb6870b34350b15c7cd8824..efb995223d37e61d08bcdf4745fa5a498cec3c65 100644
--- a/Framework/MDAlgorithms/test/BooleanBinaryOperationMDTest.h
+++ b/Framework/MDAlgorithms/test/BooleanBinaryOperationMDTest.h
@@ -9,7 +9,7 @@
 
 using namespace Mantid::MDAlgorithms;
 using namespace testing;
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 class MockBooleanBinaryOperationMD : public BooleanBinaryOperationMD {
 public:
   MOCK_METHOD0(initExtraProperties, void());
@@ -17,7 +17,7 @@ public:
                void(Mantid::DataObjects::MDHistoWorkspace_sptr,
                     Mantid::DataObjects::MDHistoWorkspace_const_sptr));
 };
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 class BooleanBinaryOperationMDTest : public CxxTest::TestSuite {
 public:
   void test_basics() {
diff --git a/Framework/MDAlgorithms/test/LoadSQW2Test.h b/Framework/MDAlgorithms/test/LoadSQW2Test.h
index 529643da5ed586f0445fdb1f7dd26036c7009f6d..611cb953b8110a078baa617902a440814a489f83 100644
--- a/Framework/MDAlgorithms/test/LoadSQW2Test.h
+++ b/Framework/MDAlgorithms/test/LoadSQW2Test.h
@@ -190,7 +190,7 @@ private:
     }
   }
 
-  DIAG_OFF("missing-braces")
+  GNU_DIAG_OFF("missing-braces")
   DimensionProperties getExpectedDimProperties(std::string outputFrame,
                                                DataType dtype) {
     DimensionProperties expected;
@@ -231,7 +231,7 @@ private:
     return expected;
   }
 
-  DIAG_ON("missing-braces")
+  GNU_DIAG_ON("missing-braces")
 
   void checkExperimentInfoAsExpected(const IMDEventWorkspace &outputWS) {
     TS_ASSERT_EQUALS(2, outputWS.getNumExperimentInfo());
diff --git a/Framework/MDAlgorithms/test/UnaryOperationMDTest.h b/Framework/MDAlgorithms/test/UnaryOperationMDTest.h
index af029f9354117d251c09d9c66919bbbfca84ad75..78e4f426f09e0fe72875d682f9493607842be5de 100644
--- a/Framework/MDAlgorithms/test/UnaryOperationMDTest.h
+++ b/Framework/MDAlgorithms/test/UnaryOperationMDTest.h
@@ -23,11 +23,11 @@ using namespace testing;
 
 class MockUnaryOperationMD : public UnaryOperationMD {
 public:
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_METHOD1(execEvent, void(Mantid::API::IMDEventWorkspace_sptr));
   MOCK_METHOD0(checkInputs, void());
   MOCK_METHOD1(execHisto, void(Mantid::DataObjects::MDHistoWorkspace_sptr));
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
   void exec() override { UnaryOperationMD::exec(); }
 };
 
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp
index 5e8aff90eb1e1362507ad37674d899b7fb3a65ba..c6cf163b90e492335231c1309ac415e158f49962 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp
@@ -58,11 +58,11 @@ using declarePropertyType3 = void (*)(boost::python::object &,
 using declarePropertyType4 = void (*)(boost::python::object &,
                                       const std::string &,
                                       const boost::python::object &, const int);
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 // Overload types
 BOOST_PYTHON_FUNCTION_OVERLOADS(declarePropertyType1_Overload,
                                 PythonAlgorithm::declarePyAlgProperty, 2, 3)
@@ -70,9 +70,9 @@ BOOST_PYTHON_FUNCTION_OVERLOADS(declarePropertyType2_Overload,
                                 PythonAlgorithm::declarePyAlgProperty, 3, 6)
 BOOST_PYTHON_FUNCTION_OVERLOADS(declarePropertyType3_Overload,
                                 PythonAlgorithm::declarePyAlgProperty, 4, 5)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 
 /**
  * Map a CancelException to a Python KeyboardInterupt
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp
index 56aff4917893f79bfeaae892922cd8fe0edf17f1..33f2988f35a79fafa65ea44ede4422cddd24a1ab 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp
@@ -81,7 +81,7 @@ list getDescriptors(AlgorithmFactoryImpl &self, bool includeHidden) {
 // Python algorithm registration mutex in anonymous namespace (aka static)
 std::recursive_mutex PYALG_REGISTER_MUTEX;
 
-DIAG_OFF("cast-qual")
+GNU_DIAG_OFF("cast-qual")
 
 /**
  * A free function to subscribe a Python algorithm into the factory
@@ -117,21 +117,21 @@ void subscribe(AlgorithmFactoryImpl &self, const boost::python::object &obj) {
   FileLoaderRegistry::Instance().unsubscribe(descr.first, descr.second);
 }
 
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(existsOverloader, exists, 1, 2)
 
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 
 ///@endcond
 }
-DIAG_ON("cast-qual")
+GNU_DIAG_ON("cast-qual")
 
 void export_AlgorithmFactory() {
 
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp
index 4f3664d63b37fb67c4130871ab69d84c104968d2..ddeafe237a92466fc7735896cad9abedacb0f0e8 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp
@@ -56,20 +56,20 @@ boost::python::list runningInstancesOf(AlgorithmManagerImpl &self,
 
 ///@cond
 //------------------------------------------------------------------------------------------------------
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 /// Define overload generators
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(create_overloads,
                                        AlgorithmManagerImpl::create, 1, 2)
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(createUnmanaged_overloads,
                                        AlgorithmManagerImpl::createUnmanaged, 1,
                                        2)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 ///@endcond
 }
 
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp
index 56b731e0510a901ec1f6b10452a2ac732157f609..ba5ac864603ea009cd523a93c9c0299f450f58c2 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp
@@ -29,18 +29,18 @@ GET_POINTER_SPECIALIZATION(Axis)
 namespace {
 
 //------------------------------- Overload macros ---------------------------
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 
 // Overloads for operator() function which has 1 optional argument
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Axis_getValue, Axis::getValue, 1, 2)
 
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 /**
  * Extract the axis values as a sequence. A numpy array is used if the
  * data is numerical or a simple python list is used if the data is a string
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/CompositeFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/CompositeFunction.cpp
index be62f9387cac756bf15674dca8229b4460e6898e..8a5d68a0f77d078d79a7900b9a96e80396d132d9 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/CompositeFunction.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/CompositeFunction.cpp
@@ -19,15 +19,15 @@ using getParameterType2 =
 
 using setParameterType2 = void (CompositeFunction::*)(const std::string &,
                                                       const double &, bool);
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("conversion")
 
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(setParameterType2_Overloads,
                                        setParameter, 2, 3)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 } // namespace
 
 void export_CompositeFunction() {
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ExperimentInfo.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ExperimentInfo.cpp
index dab723c160c88f94192fa29c30b9bc5c88d6d580..859b8f876a03de974bbdf8032534e008e7c57a11 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/ExperimentInfo.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/ExperimentInfo.cpp
@@ -18,17 +18,17 @@ using namespace boost::python;
 
 GET_POINTER_SPECIALIZATION(ExperimentInfo)
 
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 /// Overload generator for getInstrumentFilename
 BOOST_PYTHON_FUNCTION_OVERLOADS(getInstrumentFilename_Overload,
                                 ExperimentInfo::getInstrumentFilename, 1, 2)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 
 void export_ExperimentInfo() {
   register_ptr_to_python<boost::shared_ptr<ExperimentInfo>>();
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp
index de9a731bdf0248dba94f15a42367438d1914f8ab..e3038c9b275de611164eadf952c1b1517b16f358 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp
@@ -9,17 +9,17 @@ using Mantid::API::FileFinderImpl;
 using namespace boost::python;
 
 namespace {
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getFullPathOverloader, getFullPath, 1, 2)
 
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 }
 
 void export_FileFinder() {
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp
index b75f9433a52c7c655792d86052887ba38a01c8f8..7c3815e228ab4c2b6a5cb0ad28dda8a3bf57d0f1 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp
@@ -50,11 +50,11 @@ double getError(IFunction &self, std::string const &name) {
 // -- Set property overloads --
 // setProperty(index,value,explicit)
 using setParameterType1 = void (IFunction::*)(size_t, const double &, bool);
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(setParameterType1_Overloads,
                                        setParameter, 2, 3)
@@ -72,9 +72,9 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(fix_Overloads, fix, 1, 2)
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(fixAll_Overloads, fixAll, 0, 1)
 using removeTieByName = void (IFunction::*)(const std::string &);
 
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 ///@endcond
 }
 
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp
index 40fc4b31474b808d4aa30082627339bf948aabdd..8aff94f50b9500e897ae304741a3a159291a0202 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp
@@ -6,7 +6,7 @@
 #include <boost/python/extract.hpp>
 #include <boost/python/list.hpp>
 
-DIAG_OFF("strict-aliasing")
+GNU_DIAG_OFF("strict-aliasing")
 
 using Mantid::API::IMaskWorkspace;
 using namespace Mantid::PythonInterface::Registry;
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp
index c2ed21d751638f4698bf460451920b60b885d0e5..5881a50b4320ee5dbc7fa0e6d1449ec2cda47e34 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp
@@ -49,17 +49,17 @@ using return_readwrite_numpy =
     return_value_policy<VectorRefToNumpy<WrapReadWrite>>;
 
 //------------------------------- Overload macros ---------------------------
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 // Overloads for binIndexOf function which has 1 optional argument
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(MatrixWorkspace_binIndexOfOverloads,
                                        MatrixWorkspace::binIndexOf, 1, 2)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 
 /**
  * Set the values from an python array-style object into the given spectrum in
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Projection.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Projection.cpp
index 86b8357d3e7446900add592326bab4a0d5b97f86..9790728aba3a875e73eade173ba8046e0a5f5544 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/Projection.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/Projection.cpp
@@ -15,7 +15,7 @@ using namespace Mantid::API;
 using namespace Mantid::PythonInterface;
 using namespace boost::python;
 
-DIAG_OFF("strict-aliasing")
+GNU_DIAG_OFF("strict-aliasing")
 
 namespace {
 std::string getUnit(Projection &p, size_t nd) {
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp
index 4a62e3da0a411d781821a8f761dc430ab02c471f..475cd33876e5b57a76f196a8295a8900955fe7b1 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp
@@ -115,17 +115,17 @@ bpl::list keys(Run &self) {
   return names;
 }
 }
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(integrateProtonCharge_Overload,
                                        integrateProtonCharge, 0, 1)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 
 void export_Run() {
   // Pointer
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp
index 3723d3630e63c3fbe64798e1a6884512a1c92a4a..bd6016b98611542d216abb622c70507605ae5d3f 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp
@@ -19,16 +19,16 @@ GET_POINTER_SPECIALIZATION(Workspace)
 
 namespace {
 ///@cond
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Workspace_isDirtyOverloads,
                                        Workspace::isDirty, 0, 1)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 
 ///@endcond
 }
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp
index 67a79033bcb8b4d64cc82bb36dc98a205f7668f6..e03d7460919c960973f705c4938e5c2bbcf22904 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp
@@ -46,20 +46,20 @@ Workspace_sptr createFromParentPtr(WorkspaceFactoryImpl &self,
 }
 
 /// Overload generator for create
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 
 BOOST_PYTHON_FUNCTION_OVERLOADS(createFromParent_Overload, createFromParentPtr,
                                 2, 5)
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(createTable_Overload, createTable, 0, 1)
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(createPeaks_Overload, createPeaks, 0, 1)
 
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 }
 
 void export_WorkspaceFactory() {
diff --git a/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp b/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp
index 6041a58a8d1c3c4265997cb21bde8f6b1aa4fd16..c02034162d99cb6ddbdc201ee9d1ded9fbab3c26 100644
--- a/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp
+++ b/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp
@@ -147,7 +147,7 @@ bool AlgorithmAdapter<BaseAlgorithm>::isRunning() const {
   } else {
     Environment::GlobalInterpreterLock gil;
 
-    DIAG_OFF("parentheses-equality")
+    GNU_DIAG_OFF("parentheses-equality")
     PyObject *result = PyObject_CallObject(m_isRunningObj, nullptr);
     if (PyErr_Occurred())
       throw Environment::PythonException();
@@ -163,7 +163,7 @@ bool AlgorithmAdapter<BaseAlgorithm>::isRunning() const {
       throw std::runtime_error(
           "Algorithm.isRunning - Expected bool return type.");
   }
-  DIAG_ON("parentheses-equality")
+  GNU_DIAG_ON("parentheses-equality")
 }
 
 /**
diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp
index 1e977c6a8c992cd3710b1127d4669a64f42668c5..c412755bb39146edb8964a07062d50422a86f471 100644
--- a/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp
+++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp
@@ -8,11 +8,11 @@ using Mantid::Geometry::IComponent;
 using namespace boost::python;
 
 namespace {
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 
 // Default parameter function overloads
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getParameterNames,
@@ -43,9 +43,9 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getParamShortDescription,
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getParamDescription,
                                        Component::getParamDescription, 1, 2)
 
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 }
 void export_Component() {
   class_<Component, bases<IComponent>, boost::noncopyable>("Component", no_init)
diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp
index fd911aec5070ea999a17a9eba5e3759bc8f9e32e..58b395ab81e383eb0f9a95c8836051a6ebf8b015 100644
--- a/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp
+++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp
@@ -16,17 +16,17 @@ using namespace boost::python;
 namespace //<unnamed>
     {
 ///@cond
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 // define overloaded functions
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getEulerAngles_overloads,
                                        Goniometer::getEulerAngles, 0, 1)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 ///@endcond
 
 /// Set the U vector via a numpy array
diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/IMDDimension.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/IMDDimension.cpp
index 434faa02f5774069f09b55d9ece49d1b39b2e1f3..1399f357870974c1544eeaa61e8c92461ced501f 100644
--- a/Framework/PythonInterface/mantid/geometry/src/Exports/IMDDimension.cpp
+++ b/Framework/PythonInterface/mantid/geometry/src/Exports/IMDDimension.cpp
@@ -15,7 +15,7 @@ using namespace boost::python;
 
 GET_POINTER_SPECIALIZATION(IMDDimension)
 
-DIAG_OFF("strict-aliasing")
+GNU_DIAG_OFF("strict-aliasing")
 
 namespace {
 /**
diff --git a/Framework/PythonInterface/mantid/kernel/src/Converters/DateAndTime.cpp b/Framework/PythonInterface/mantid/kernel/src/Converters/DateAndTime.cpp
index a161d2e067db4e3e606ba887fb360cef4fd70d71..14003221c01708d87e1dd60e41452902d2e3d491 100644
--- a/Framework/PythonInterface/mantid/kernel/src/Converters/DateAndTime.cpp
+++ b/Framework/PythonInterface/mantid/kernel/src/Converters/DateAndTime.cpp
@@ -47,9 +47,9 @@ PyArray_Descr *descr_ns() { return func_PyArray_Descr("M8[ns]"); }
 // internal function that handles raw pointer
 boost::shared_ptr<Types::Core::DateAndTime>
 to_dateandtime(const PyObject *datetime) {
-DIAG_OFF("cast-qual")
+  GNU_DIAG_OFF("cast-qual")
   if (!PyArray_IsScalar(datetime, Datetime)) {
-DIAG_ON("cast-qual")
+    GNU_DIAG_ON("cast-qual")
     throw std::runtime_error("Expected datetime64");
   }
 
diff --git a/Framework/PythonInterface/mantid/kernel/src/Converters/PyObjectToVMD.cpp b/Framework/PythonInterface/mantid/kernel/src/Converters/PyObjectToVMD.cpp
index 21714b24d79ce87f9d24bf51e6fc5317c79e9486..7a5c3892b5f831d794f791cbd75550bb432cb99a 100644
--- a/Framework/PythonInterface/mantid/kernel/src/Converters/PyObjectToVMD.cpp
+++ b/Framework/PythonInterface/mantid/kernel/src/Converters/PyObjectToVMD.cpp
@@ -15,7 +15,7 @@ using boost::python::extract;
 using boost::python::object;
 using boost::python::len;
 
-DIAG_OFF("strict-aliasing")
+GNU_DIAG_OFF("strict-aliasing")
 
 namespace Mantid {
 namespace PythonInterface {
diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp
index 3ccd748bc939e3ee8c25631ac593ccfd0860c041..ea5c8e67f1c736116a1b7af1ba05dbd18c9297d7 100644
--- a/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp
+++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp
@@ -32,20 +32,20 @@ std::string getStringUsingCache(ConfigServiceImpl &self,
   return self.getString(key, true);
 }
 
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 /// Overload generator for getInstrument
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getInstrument_Overload, getInstrument, 0,
                                        1)
 /// Overload generator for getString
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getString_Overload, getString, 1, 2)
 
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 }
 
 void export_ConfigService() {
diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Property.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Property.cpp
index 1b437645aff69e87b5c817b331785cfba64d876a..a6cbf33693fcf6afa33df7c4dc2f69c4be40253b 100644
--- a/Framework/PythonInterface/mantid/kernel/src/Exports/Property.cpp
+++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Property.cpp
@@ -24,18 +24,18 @@ using Mantid::PythonInterface::std_vector_exporter;
 using namespace boost::python;
 
 GET_POINTER_SPECIALIZATION(Property)
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(valueAsPrettyStrOverloader,
 
                                        valueAsPrettyStr, 0, 2)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 
 void export_Property() {
   register_ptr_to_python<Property *>();
diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp
index 8ae19f436b876f8d75fd0a6ebc47a56617f96342..c62d588d214ce84f93d809418d8d4bbb9452bd63 100644
--- a/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp
+++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp
@@ -97,18 +97,18 @@ Statistics getStatisticsNumpy(const NumPy::NdArray &data,
   }
 }
 
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 
 // Define an overload to handle the default argument
 BOOST_PYTHON_FUNCTION_OVERLOADS(getStatisticsOverloads, getStatisticsNumpy, 1,
                                 2)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 //============================ Z score
 //============================================
 
@@ -157,18 +157,18 @@ std::vector<double> getModifiedZscoreNumpy(const NumPy::NdArray &data,
   }
 }
 
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 
 // Define an overload to handle the default argument
 BOOST_PYTHON_FUNCTION_OVERLOADS(getModifiedZscoreOverloads,
                                 getModifiedZscoreNumpy, 1, 2)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 
 //============================ getMoments
 //============================================
@@ -219,17 +219,17 @@ std::vector<double> getMomentsAboutOriginNumpy(const NumPy::NdArray &indep,
   return getMomentsNumpyImpl(&getMomentsAboutOrigin, indep, depend, maxMoment);
 }
 
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 // Define an overload to handle the default argument
 BOOST_PYTHON_FUNCTION_OVERLOADS(getMomentsAboutOriginOverloads,
                                 getMomentsAboutOriginNumpy, 2, 3)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 /**
  * Proxy for @see Mantid::Kernel::getMomentsAboutMean so that it can accept
  * numpy arrays
@@ -241,17 +241,17 @@ std::vector<double> getMomentsAboutMeanNumpy(const NumPy::NdArray &indep,
   return getMomentsNumpyImpl(&getMomentsAboutMean, indep, depend, maxMoment);
 }
 
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 // Define an overload to handle the default argument
 BOOST_PYTHON_FUNCTION_OVERLOADS(getMomentsAboutMeanOverloads,
                                 getMomentsAboutMeanNumpy, 2, 3)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 
 ///@endcond
 }
diff --git a/Framework/PythonInterface/mantid/kernel/src/Registry/PropertyWithValueFactory.cpp b/Framework/PythonInterface/mantid/kernel/src/Registry/PropertyWithValueFactory.cpp
index 0082d0e6d5e7184c56a5ef6d7e852f869cd8142e..1dbd805faf2e6adb8f20a7757a82990fcf238b67 100644
--- a/Framework/PythonInterface/mantid/kernel/src/Registry/PropertyWithValueFactory.cpp
+++ b/Framework/PythonInterface/mantid/kernel/src/Registry/PropertyWithValueFactory.cpp
@@ -187,7 +187,7 @@ const std::string PropertyWithValueFactory::isArray(PyObject *const object) {
 
     PyObject *item = PySequence_Fast_GET_ITEM(object, 0);
     // Boolean can be cast to int, so check first.
-    DIAG_OFF("parentheses-equality")
+    GNU_DIAG_OFF("parentheses-equality")
     if (PyBool_Check(item)) {
       throw std::runtime_error(
           "Unable to support extracting arrays of booleans.");
@@ -195,7 +195,7 @@ const std::string PropertyWithValueFactory::isArray(PyObject *const object) {
     if (PyLong_Check(item)) {
       return std::string("LongIntArray");
     }
-    DIAG_ON("parentheses-equality")
+    GNU_DIAG_ON("parentheses-equality")
 
 #if PY_MAJOR_VERSION < 3
     // In python 2 ints & longs are separate
diff --git a/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelperModule.cpp b/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelperModule.cpp
index d75a8ad43c7ddabdd087230d053ca34b1db6e189..73a9ed41f54d834042b291028b8a66dce8c1cfa9 100644
--- a/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelperModule.cpp
+++ b/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelperModule.cpp
@@ -22,11 +22,11 @@ using namespace Mantid::DataObjects::MDEventsTestHelper;
 using namespace Mantid::PythonInterface::Policies;
 using namespace WorkspaceCreationHelper;
 
-DIAG_OFF("unknown-pragmas")
-DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unknown-pragmas")
+GNU_DIAG_OFF("unused-local-typdef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
-DIAG_OFF("conversion")
+GNU_DIAG_OFF("conversion")
 BOOST_PYTHON_FUNCTION_OVERLOADS(create2DWorkspaceWithFullInstrument_overloads,
                                 create2DWorkspaceWithFullInstrument, 2, 4)
 
@@ -36,9 +36,9 @@ BOOST_PYTHON_FUNCTION_OVERLOADS(makeFakeMDHistoWorkspace_overloads,
 BOOST_PYTHON_FUNCTION_OVERLOADS(
     create2DWorkspaceWithRectangularInstrument_overloads,
     create2DWorkspaceWithRectangularInstrument, 3, 3)
-DIAG_ON("conversion")
-DIAG_ON("unknown-pragmas")
-DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("conversion")
+GNU_DIAG_ON("unknown-pragmas")
+GNU_DIAG_ON("unused-local-typdef")
 
 BOOST_PYTHON_MODULE(WorkspaceCreationHelper) {
   using namespace boost::python;
diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h
index 41f3fb1d6adad6aa167edfc5326abcb1e1f15d32..18ea02908f1a0f7cdfd007e8116c8cd56ff1c29b 100644
--- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h
+++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h
@@ -53,14 +53,14 @@ public:
   void loadConfiguration(Instrument_const_sptr poldiInstrument) override {
     UNUSED_ARG(poldiInstrument);
   }
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_METHOD0(efficiency, double());
   MOCK_METHOD1(twoTheta, double(int elementIndex));
   MOCK_METHOD1(distanceFromSample, double(int elementIndex));
   MOCK_METHOD0(elementCount, size_t());
   MOCK_METHOD0(centralElement, size_t());
   MOCK_METHOD2(qLimits, DoublePair(double lambdaMin, double lambdaMax));
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 
   const std::vector<int> &availableElements() override {
     return m_availableElements;
@@ -105,14 +105,14 @@ public:
   void loadConfiguration(Instrument_const_sptr poldiInstrument) override {
     UNUSED_ARG(poldiInstrument)
   }
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_METHOD0(rotationSpeed, double());
   MOCK_METHOD0(cycleTime, double());
   MOCK_METHOD0(zeroOffset, double());
   MOCK_METHOD0(distanceFromSample, double());
 
   MOCK_METHOD1(setRotationSpeed, void(double rotationSpeed));
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 
   const std::vector<double> &slitPositions() override {
     return m_slitPositions;
diff --git a/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h b/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h
index 15f7b2a39ae3ca5918db0191d663f2677fda45f7..752b8030b421d597fb421bea534846852fb478e7 100644
--- a/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h
+++ b/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h
@@ -21,7 +21,7 @@ using Mantid::Kernel::V3D;
 using ::testing::_;
 using ::testing::Mock;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockPawleyFunction : public IPawleyFunction {
 public:
@@ -45,7 +45,7 @@ public:
 
   MOCK_METHOD4(setMatrixWorkspace,
                void(MatrixWorkspace_const_sptr, size_t, double, double));
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 protected:
   void init() override { setDecoratedFunction("Gaussian"); }
 };
diff --git a/MantidPlot/src/PythonScript.cpp b/MantidPlot/src/PythonScript.cpp
index 0945360aa710ee33d8ee5a718c5de88b13e0a2e2..188c79348cc5d4efd103658fa52d6388d91474b1 100644
--- a/MantidPlot/src/PythonScript.cpp
+++ b/MantidPlot/src/PythonScript.cpp
@@ -540,9 +540,9 @@ QVariant PythonScript::evaluateImpl() {
     }
   }
   /* bool */
-  DIAG_OFF("parentheses-equality")
+  GNU_DIAG_OFF("parentheses-equality")
   else if (PyBool_Check(pyret)) {
-  DIAG_ON("parentheses-equality")
+    GNU_DIAG_ON("parentheses-equality")
     qret = QVariant(pyret == Py_True);
   }
   // could handle advanced types (such as PyList->QValueList) here if needed
diff --git a/qt/paraview_ext/PVPlugins/Sources/MDEWSource/vtkMDEWSource.cxx b/qt/paraview_ext/PVPlugins/Sources/MDEWSource/vtkMDEWSource.cxx
index 1e3234c2604e544d14f438bff732ad172a6f331c..21aaf2990ce0f214a13d9899ef131b086a0508d0 100644
--- a/qt/paraview_ext/PVPlugins/Sources/MDEWSource/vtkMDEWSource.cxx
+++ b/qt/paraview_ext/PVPlugins/Sources/MDEWSource/vtkMDEWSource.cxx
@@ -185,7 +185,7 @@ int vtkMDEWSource::RequestData(vtkInformation *, vtkInformationVector **,
   return 1;
 }
 
-DIAG_OFF("strict-aliasing")
+GNU_DIAG_OFF("strict-aliasing")
 int vtkMDEWSource::RequestInformation(
     vtkInformation *vtkNotUsed(request),
     vtkInformationVector **vtkNotUsed(inputVector),
diff --git a/qt/paraview_ext/VatesAPI/src/vtkDataSetToPeaksFilteredDataSet.cpp b/qt/paraview_ext/VatesAPI/src/vtkDataSetToPeaksFilteredDataSet.cpp
index 4e57eac73c6866796a1ee95174182dd6efdb59d2..bc488ffe6ccca1cf1d4f3e2a7f4dd0ea59f00976 100644
--- a/qt/paraview_ext/VatesAPI/src/vtkDataSetToPeaksFilteredDataSet.cpp
+++ b/qt/paraview_ext/VatesAPI/src/vtkDataSetToPeaksFilteredDataSet.cpp
@@ -176,7 +176,7 @@ vtkDataSetToPeaksFilteredDataSet::getPeaksInfo(
   return peaksInfo;
 }
 
-DIAG_OFF("strict-aliasing")
+GNU_DIAG_OFF("strict-aliasing")
 /**
  * Get the radius from a PeakShape object.
  * @param shape The PeakShape from which the information will be extracted.
diff --git a/qt/paraview_ext/VatesAPI/test/BoxInfoTest.h b/qt/paraview_ext/VatesAPI/test/BoxInfoTest.h
index 553947445fe8e6c50463e1df81cf1fe6eee9548b..234830fe6b0f32d5c49c4473cfde0b28b04b96ae 100644
--- a/qt/paraview_ext/VatesAPI/test/BoxInfoTest.h
+++ b/qt/paraview_ext/VatesAPI/test/BoxInfoTest.h
@@ -54,7 +54,7 @@ public:
     AnalysisDataService::Instance().remove(wsName);
   }
 
-  DIAG_OFF("strict-aliasing")
+  GNU_DIAG_OFF("strict-aliasing")
   void test_initial_recursion_depth_is_1_for_MD_Event_w_split() {
     // Arrange
     const std::string wsName = "MD_EVENT_WS_WITH_SPLITTING";
diff --git a/qt/paraview_ext/VatesAPI/test/ConcretePeaksPresenterVsiTest.h b/qt/paraview_ext/VatesAPI/test/ConcretePeaksPresenterVsiTest.h
index efd6d6cc00ade9cd72d09c3548bfd8bbaad3fb92..e1dda3642d5de1b739201154788f43c6600205a4 100644
--- a/qt/paraview_ext/VatesAPI/test/ConcretePeaksPresenterVsiTest.h
+++ b/qt/paraview_ext/VatesAPI/test/ConcretePeaksPresenterVsiTest.h
@@ -23,7 +23,7 @@
 
 using namespace ::testing;
 using namespace Mantid::VATES;
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 class MockPeakConcrete : public Mantid::DataObjects::Peak {
 public:
   MOCK_CONST_METHOD0(getHKL, Mantid::Kernel::V3D(void));
@@ -38,7 +38,7 @@ public:
   MOCK_METHOD1(getPeak, Mantid::DataObjects::Peak &(int peakNum));
   MOCK_CONST_METHOD1(getPeak, const Mantid::DataObjects::Peak &(int peakNum));
 };
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 class ConcretePeaksPresenterVsiTest : public CxxTest::TestSuite {
 public:
   void testSetupPresenterCorrectly() {
diff --git a/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h
index 67f605521607a98859fc5a362aa70d9d2b55b85c..3896fc2615322216c100fc25936be8edb8ce4ddb 100644
--- a/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h
+++ b/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h
@@ -26,12 +26,12 @@ private:
   // Helper type. Mocks a Workspace Provider.
   class MockWorkspaceProvider : public Mantid::VATES::WorkspaceProvider {
   public:
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD1(canProvideWorkspace, bool(std::string));
     MOCK_CONST_METHOD1(fetchWorkspace,
                        Mantid::API::Workspace_sptr(std::string));
     MOCK_CONST_METHOD1(disposeWorkspace, void(std::string));
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 
   // Helper method. Generates and returns a valid IMDEventWorkspace
diff --git a/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h
index 13505a319b34d3f8b4acb1a5ce006d4d1de59ac7..fdc15bd153c8d51e9d05880ecddc2f31fc629da6 100644
--- a/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h
+++ b/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h
@@ -27,12 +27,12 @@ private:
   // Helper type. Mocks a Workspace Provider.
   class MockWorkspaceProvider : public Mantid::VATES::WorkspaceProvider {
   public:
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD1(canProvideWorkspace, bool(std::string));
     MOCK_CONST_METHOD1(fetchWorkspace,
                        Mantid::API::Workspace_sptr(std::string));
     MOCK_CONST_METHOD1(disposeWorkspace, void(std::string));
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 
   // Helper method. Generates and returns a valid IMDHistoWorkspace
diff --git a/qt/paraview_ext/VatesAPI/test/MockObjects.h b/qt/paraview_ext/VatesAPI/test/MockObjects.h
index d780778f224e037d2b00806cd2008d41f19bfa7a..98c00b3d63ed5cb3d151cbddac219c2a80035bbd 100644
--- a/qt/paraview_ext/VatesAPI/test/MockObjects.h
+++ b/qt/paraview_ext/VatesAPI/test/MockObjects.h
@@ -69,7 +69,7 @@ public:
   ~FakeIMDDimension() override {}
 };
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 //=================================================================================================
 /// Concrete mocked implementation of IMDWorkspace for testing.
 class MockIMDWorkspace : public Mantid::API::IMDWorkspace {
@@ -178,7 +178,7 @@ public:
   MOCK_METHOD1(eventRaised, void(double));
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 class FakeProgressAction : public Mantid::VATES::ProgressAction {
   void eventRaised(double) override {}
@@ -189,7 +189,7 @@ Create a field data entry containing (as contents) the argument text.
 @param testData : Text to enter
 @return new vtkFieldData object containing text.
 */
-UNUSED_FUNCTION vtkFieldData *
+GNU_UNUSED_FUNCTION vtkFieldData *
 createFieldDataWithCharArray(std::string testData) {
   vtkFieldData *fieldData = vtkFieldData::New();
   vtkCharArray *charArray = vtkCharArray::New();
@@ -274,7 +274,7 @@ view.
 view.
 @return full xml as string.
 */
-UNUSED_FUNCTION std::string
+GNU_UNUSED_FUNCTION std::string
 constructXML(const std::string &xDimensionIdMapping,
              const std::string &yDimensionIdMapping,
              const std::string &zDimensionIdMapping,
@@ -372,7 +372,7 @@ view.
 view.
 @return full xml as string.
 */
-UNUSED_FUNCTION std::string
+GNU_UNUSED_FUNCTION std::string
 constructXMLForMDEvHelperData(const std::string &xDimensionIdMapping,
                               const std::string &yDimensionIdMapping,
                               const std::string &zDimensionIdMapping,
@@ -403,7 +403,7 @@ Mantid::API::Workspace_sptr createSimple3DWorkspace() {
   return outWs;
 }
 
-UNUSED_FUNCTION Mantid::API::Workspace_sptr
+GNU_UNUSED_FUNCTION Mantid::API::Workspace_sptr
 get3DWorkspace(bool integratedTDimension, bool sliceMD) {
   using namespace Mantid::API;
   using namespace Mantid::DataObjects;
@@ -442,8 +442,8 @@ get3DWorkspace(bool integratedTDimension, bool sliceMD) {
  * @param fieldName : The requested field data entry
  * @return The value of the requested field data entry
  */
-UNUSED_FUNCTION std::string getStringFieldDataValue(vtkDataSet *ds,
-                                                    std::string fieldName) {
+GNU_UNUSED_FUNCTION std::string getStringFieldDataValue(vtkDataSet *ds,
+                                                        std::string fieldName) {
   vtkAbstractArray *value =
       ds->GetFieldData()->GetAbstractArray(fieldName.c_str());
   vtkStringArray *array = vtkStringArray::SafeDownCast(value);
diff --git a/qt/paraview_ext/VatesAPI/test/VatesKnowledgeSerializerTest.h b/qt/paraview_ext/VatesAPI/test/VatesKnowledgeSerializerTest.h
index d6c180ba6807bd0655e30572b4892a1804ce89a2..0bf7170f55b712d58bd0fca9bc63384d89465926 100644
--- a/qt/paraview_ext/VatesAPI/test/VatesKnowledgeSerializerTest.h
+++ b/qt/paraview_ext/VatesAPI/test/VatesKnowledgeSerializerTest.h
@@ -21,13 +21,13 @@ private:
   // Helper class
   class MockImplicitFunction : public Mantid::Geometry::MDImplicitFunction {
   public:
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_METHOD1(isPointContained, bool(const Mantid::coord_t *pPoint));
     MOCK_METHOD1(isPointContained, bool(const std::vector<Mantid::coord_t> &));
     MOCK_METHOD1(isPointContained, bool(const Mantid::Kernel::VMD &));
     MOCK_CONST_METHOD0(getName, std::string());
     MOCK_CONST_METHOD0(toXMLString, std::string());
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
   };
 
   // Test methods
diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetFactoryTest.h
index c21dd7ddb85a24f90b36027138ec52a44e8910a3..8b3f3929e4e8d2a6d69beed6a04c725c3a004f3c 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkDataSetFactoryTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetFactoryTest.h
@@ -27,14 +27,14 @@ private:
   /// Mocked helper type
   class MockvtkDataSetFactory : public Mantid::VATES::vtkDataSetFactory {
   public:
-    DIAG_OFF_SUGGEST_OVERRIDE
+    GNU_DIAG_OFF_SUGGEST_OVERRIDE
     MOCK_CONST_METHOD1(
         create, vtkSmartPointer<vtkDataSet>(Mantid::VATES::ProgressAction &));
     MOCK_METHOD1(initialize,
                  void(const boost::shared_ptr<Mantid::API::Workspace> &));
     MOCK_CONST_METHOD0(validate, void());
     MOCK_CONST_METHOD0(getFactoryTypeName, std::string());
-    DIAG_ON_SUGGEST_OVERRIDE
+    GNU_DIAG_ON_SUGGEST_OVERRIDE
     void setSuccessorConcrete(std::unique_ptr<vtkDataSetFactory> pSuccessor) {
       vtkDataSetFactory::setSuccessor(pSuccessor);
     }
diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h
index 0cf478b386905b8ff8b09efad31bfdc56293f410..7fc2ee04fa5aa88deedbf67278fe1f7b7d73bdc2 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h
@@ -36,7 +36,7 @@
 using namespace Mantid::DataObjects;
 using namespace Mantid::VATES;
 using namespace ::testing;
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 class MockPeakFilter : public Mantid::DataObjects::Peak {
 public:
   MOCK_CONST_METHOD0(getHKL, Mantid::Kernel::V3D(void));
@@ -50,7 +50,7 @@ public:
   MOCK_METHOD1(getPeak, Mantid::DataObjects::Peak &(int peakNum));
   MOCK_CONST_METHOD1(getPeak, const Mantid::DataObjects::Peak &(int peakNum));
 };
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 struct PeaksFilterDataContainer {
   double radius;
   double radiusFactor;
diff --git a/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h
index 5708fed44b67594a422311a505094cd7f4a40c2b..89215450f8646fd58b22fdc1c50ec38d17a3c6d1 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h
@@ -25,7 +25,7 @@ using namespace ::testing;
 using namespace Mantid::VATES;
 using Mantid::VATES::vtkPeakMarkerFactory;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockPeakShape : public Peak {
 public:
@@ -55,7 +55,7 @@ public:
   MOCK_METHOD1(getPeak, Mantid::DataObjects::Peak &(int peakNum));
   MOCK_CONST_METHOD1(getPeak, const Mantid::DataObjects::Peak &(int peakNum));
 };
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 //=====================================================================================
 // Functional Tests
diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ViewBase.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ViewBase.cpp
index e16cf8128fdcadfec24f2025c34795f9df09358c..9393468cd4a03df543dfdbffac8614c4036f56ec 100644
--- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ViewBase.cpp
+++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ViewBase.cpp
@@ -268,7 +268,7 @@ pqPipelineRepresentation *ViewBase::getPvActiveRep() {
   return qobject_cast<pqPipelineRepresentation *>(drep);
 }
 
-DIAG_OFF("strict-aliasing")
+GNU_DIAG_OFF("strict-aliasing")
 /**
  * This function creates a ParaView source from a given plugin name and
  * workspace name. This is used in the plugin mode of the simple interface.
diff --git a/qt/scientific_interfaces/test/ALCBaselineModellingPresenterTest.h b/qt/scientific_interfaces/test/ALCBaselineModellingPresenterTest.h
index 37b9be20776422f2d71f92db88a0fa4db0e344fa..729e4c2c31c878f477452ad6ada16346233e53f3 100644
--- a/qt/scientific_interfaces/test/ALCBaselineModellingPresenterTest.h
+++ b/qt/scientific_interfaces/test/ALCBaselineModellingPresenterTest.h
@@ -24,7 +24,7 @@ using Mantid::HistogramData::Counts;
 using Mantid::HistogramData::CountStandardDeviations;
 using Mantid::HistogramData::LinearGenerator;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockALCBaselineModellingView : public IALCBaselineModellingView {
 public:
@@ -91,7 +91,7 @@ MATCHER_P3(QwtDataY, i, value, delta, "") {
 MATCHER_P3(VectorValue, i, value, delta, "") {
   return fabs(arg.at(i) - value) < delta;
 }
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 class ALCBaselineModellingPresenterTest : public CxxTest::TestSuite {
   MockALCBaselineModellingView *m_view;
diff --git a/qt/scientific_interfaces/test/ALCDataLoadingPresenterTest.h b/qt/scientific_interfaces/test/ALCDataLoadingPresenterTest.h
index cd66f852cbe70f90ce812e11c3db0667ac956cc0..8d58e411c2043ddd7a97369a086cc782da8b9ce4 100644
--- a/qt/scientific_interfaces/test/ALCDataLoadingPresenterTest.h
+++ b/qt/scientific_interfaces/test/ALCDataLoadingPresenterTest.h
@@ -25,7 +25,7 @@ operator<<(std::basic_ostream<CharType, CharTrait> &out,
 }
 }
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockALCDataLoadingView : public IALCDataLoadingView {
   // XXX: A workaround, needed because of the way the comma is treated in a
@@ -78,7 +78,7 @@ MATCHER_P3(VectorValue, i, value, delta, "") {
   return fabs(arg.at(i) - value) < delta;
 }
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 class ALCDataLoadingPresenterTest : public CxxTest::TestSuite {
   MockALCDataLoadingView *m_view;
diff --git a/qt/scientific_interfaces/test/ALCPeakFittingPresenterTest.h b/qt/scientific_interfaces/test/ALCPeakFittingPresenterTest.h
index 904aa8a26e29b5c7ea6c34e5950bb88a54527cf3..f5a1bdb4b72875be73e31814babc3e41c914e7de 100644
--- a/qt/scientific_interfaces/test/ALCPeakFittingPresenterTest.h
+++ b/qt/scientific_interfaces/test/ALCPeakFittingPresenterTest.h
@@ -32,7 +32,7 @@ operator<<(std::basic_ostream<CharType, CharTrait> &out,
 }
 }
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockALCPeakFittingView : public IALCPeakFittingView {
 public:
@@ -359,5 +359,5 @@ public:
     m_model->setError("Test error");
   }
 };
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 #endif /* MANTIDQT_CUSTOMINTERFACES_ALCPEAKFITTINGTEST_H_ */
diff --git a/qt/scientific_interfaces/test/EnggDiffFittingModelMock.h b/qt/scientific_interfaces/test/EnggDiffFittingModelMock.h
index 487bf501b9745b30c447f76b94fa0995f0416806..d1251f4c84a4f1f9cbf84ffb8a40a625b8f55289 100644
--- a/qt/scientific_interfaces/test/EnggDiffFittingModelMock.h
+++ b/qt/scientific_interfaces/test/EnggDiffFittingModelMock.h
@@ -13,7 +13,7 @@
 
 using namespace MantidQt::CustomInterfaces;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockEnggDiffFittingModel : public IEnggDiffFittingModel {
 
@@ -61,6 +61,6 @@ public:
   MOCK_METHOD1(removeRun, void(const RunLabel &runLabel));
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif // MANTID_CUSTOM_INTERFACES_ENGGDIFFFITTINGMODELMOCK_H
diff --git a/qt/scientific_interfaces/test/EnggDiffFittingViewMock.h b/qt/scientific_interfaces/test/EnggDiffFittingViewMock.h
index 114f9f3285059c0addd0189a1db3c416e62da2cf..58443739eddb56f4164e3136db9d998bf0232262 100644
--- a/qt/scientific_interfaces/test/EnggDiffFittingViewMock.h
+++ b/qt/scientific_interfaces/test/EnggDiffFittingViewMock.h
@@ -6,7 +6,7 @@
 
 #include <gmock/gmock.h>
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 // This is a simple mock for the tomo interface view when using SCARF.
 class MockEnggDiffFittingView
@@ -162,6 +162,6 @@ public:
                void(const std::vector<std::string> &rows));
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif // MANTID_CUSTOMINTERFACES_ENGGDIFFFITTINGVIEWMOCK_H
diff --git a/qt/scientific_interfaces/test/EnggDiffGSASFittingModelMock.h b/qt/scientific_interfaces/test/EnggDiffGSASFittingModelMock.h
index f58d44a4c6e9b0f611f065e30a0d3cc28fdb1272..404ee98a38eaada34488bb822d46a4d1b81e491b 100644
--- a/qt/scientific_interfaces/test/EnggDiffGSASFittingModelMock.h
+++ b/qt/scientific_interfaces/test/EnggDiffGSASFittingModelMock.h
@@ -6,7 +6,7 @@
 
 #include <gmock/gmock.h>
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 using namespace MantidQt::CustomInterfaces;
 
@@ -44,6 +44,6 @@ public:
                void(boost::shared_ptr<IEnggDiffGSASFittingObserver> observer));
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif // MANTID_CUSTOM_INTERFACES_ENGGDIFFFITTINGMODELMOCK_H_
diff --git a/qt/scientific_interfaces/test/EnggDiffGSASFittingViewMock.h b/qt/scientific_interfaces/test/EnggDiffGSASFittingViewMock.h
index f3501fac9aa8850abc5c06878342ce6dbacfd16d..08fd40f877a427eb203f61de3d8c0b5ac92b617e 100644
--- a/qt/scientific_interfaces/test/EnggDiffGSASFittingViewMock.h
+++ b/qt/scientific_interfaces/test/EnggDiffGSASFittingViewMock.h
@@ -8,7 +8,7 @@
 
 using namespace MantidQt::CustomInterfaces;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockEnggDiffGSASFittingView : public IEnggDiffGSASFittingView {
 
@@ -72,6 +72,6 @@ public:
                                        const std::string &warningDescription));
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif // MANTID_CUSTOMINTERFACES_ENGGDIFFGSASFITTINGVIEWMOCK_H_
diff --git a/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetModelMock.h b/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetModelMock.h
index 90bc996e71bc9f682ef9aa7371abb1866179d0f0..e44b1dbf962e524b8641bf8695bb57b9c071307e 100644
--- a/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetModelMock.h
+++ b/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetModelMock.h
@@ -8,7 +8,7 @@
 
 using namespace MantidQt::CustomInterfaces;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockEnggDiffMultiRunFittingWidgetModel
     : public IEnggDiffMultiRunFittingWidgetModel {
@@ -36,6 +36,6 @@ public:
   MOCK_METHOD1(removeRun, void(const RunLabel &runLabel));
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif // MANTIDQT_CUSTOMINTERFACES_ENGGDIFFMULTIRUNFITTINGWIDGETMODELMOCK_H_
diff --git a/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetPresenterMock.h b/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetPresenterMock.h
index 5f5457f287427cac22b9606cce18854b6a7d60b5..3c9a96f31b2a7df87944b492e213a1e2429a9a7f 100644
--- a/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetPresenterMock.h
+++ b/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetPresenterMock.h
@@ -9,7 +9,7 @@
 
 using namespace MantidQt::CustomInterfaces;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockEnggDiffMultiRunFittingWidgetPresenter
     : public IEnggDiffMultiRunFittingWidgetPresenter {
@@ -48,6 +48,6 @@ MockEnggDiffMultiRunFittingWidgetPresenter::getWidgetAdder() const {
   return Mantid::Kernel::make_unique<FakeEnggDiffMultiRunFittingWidgetAdder>();
 }
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif // MANTIDQT_CUSTOMINTERFACES_ENGGDIFFMULTIRUNFITTINGWIDGETPRESENTERMOCK_H_
diff --git a/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetViewMock.h b/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetViewMock.h
index 70d12470ded048b84fbac27316afa30b74194974..50516585f77b530009f78416950f4715a6e8ad79 100644
--- a/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetViewMock.h
+++ b/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetViewMock.h
@@ -8,7 +8,7 @@
 
 using namespace MantidQt::CustomInterfaces;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 using namespace MantidQt::CustomInterfaces;
 
@@ -53,6 +53,6 @@ public:
   MOCK_METHOD1(updateRunList, void(const std::vector<RunLabel> &runLabels));
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif // MANTIDQT_CUSTOMINTERFACES_ENGGDIFFMULTIRUNFITTINGWIDGETVIEWMOCK_H_
diff --git a/qt/scientific_interfaces/test/EnggDiffractionParamMock.h b/qt/scientific_interfaces/test/EnggDiffractionParamMock.h
index 8ffa856047f3ace07d91f4603b389644367df55a..3ece5f266b13a6767a831ac89864af7d63ed153d 100644
--- a/qt/scientific_interfaces/test/EnggDiffractionParamMock.h
+++ b/qt/scientific_interfaces/test/EnggDiffractionParamMock.h
@@ -6,7 +6,7 @@
 
 #include <gmock/gmock.h>
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 using namespace MantidQt::CustomInterfaces;
 
@@ -20,6 +20,6 @@ public:
                      std::string(const std::vector<RunLabel> &runLabels));
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif // MANTIDQTCUSTOMINTERFACES_ENGGDIFFRACTION_IENGGDIFFRACTIONPARAMMOCK_H_
diff --git a/qt/scientific_interfaces/test/EnggDiffractionViewMock.h b/qt/scientific_interfaces/test/EnggDiffractionViewMock.h
index 426384639c56c801c54c6524310a0fbfec22b274..9d19e39d902a341462649786b7e0815d4b5df197 100644
--- a/qt/scientific_interfaces/test/EnggDiffractionViewMock.h
+++ b/qt/scientific_interfaces/test/EnggDiffractionViewMock.h
@@ -8,7 +8,7 @@
 
 class QwtData;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 // This is a simple mock for the tomo interface view when using SCARF.
 class MockEnggDiffractionView
@@ -185,6 +185,6 @@ public:
   // virtual void updateTabsInstrument(const std::string & newInstrument) = 0;
   MOCK_METHOD1(updateTabsInstrument, void(const std::string &newInstrument));
 };
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif // MANTID_CUSTOMINTERFACES_ENGGDIFFRACTIONVIEWMOCK_H
diff --git a/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h b/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h
index 2e7587cc88c10f03e28f3326583e636a9c80243d..05089c4afd2b85b444134a5fc8caed3e923b9b31 100644
--- a/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h
+++ b/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h
@@ -51,7 +51,7 @@ operator<<(std::basic_ostream<CharType, CharTrait> &out,
 /// Mock data selector widget
 class MockDataSelector : public IMuonFitDataSelector {
 public:
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
   MOCK_CONST_METHOD0(getFilenames, QStringList());
   MOCK_CONST_METHOD0(getStartTime, double());
@@ -75,13 +75,13 @@ public:
   MOCK_METHOD1(setDatasetNames, void(const QStringList &));
   MOCK_CONST_METHOD0(getDatasetName, QString());
   MOCK_METHOD0(askUserWhetherToOverwrite, bool());
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 
 /// Mock fit property browser
 class MockFitBrowser : public IWorkspaceFitControl, public IMuonFitDataModel {
 public:
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_METHOD1(setWorkspaceName, void(const QString &));
   MOCK_METHOD1(setStartX, void(double));
   MOCK_METHOD1(setEndX, void(double));
@@ -99,7 +99,7 @@ public:
   void preFitChecksRequested(bool sequential) override {
     UNUSED_ARG(sequential);
   }
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 
 class MuonAnalysisFitDataPresenterTest : public CxxTest::TestSuite {
diff --git a/qt/scientific_interfaces/test/MuonAnalysisFitFunctionPresenterTest.h b/qt/scientific_interfaces/test/MuonAnalysisFitFunctionPresenterTest.h
index 390ce9f21188088c9f37ae1015c09f5fcde2b2bf..4ca54c6b973ce327463c577ee86ced178d60b915 100644
--- a/qt/scientific_interfaces/test/MuonAnalysisFitFunctionPresenterTest.h
+++ b/qt/scientific_interfaces/test/MuonAnalysisFitFunctionPresenterTest.h
@@ -25,7 +25,7 @@ public:
     m_func =
         Mantid::API::FunctionFactory::Instance().createFunction("Gaussian");
   }
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_METHOD0(getFunctionString, QString());
   Mantid::API::IFunction_sptr getGlobalFunction() override { return m_func; }
   MOCK_METHOD0(functionStructureChanged, void());
@@ -46,7 +46,7 @@ public:
   MOCK_METHOD3(setLocalParameterFixed, void(const QString &, int, bool));
   MOCK_METHOD3(setLocalParameterTie, void(const QString &, int, QString));
   MOCK_METHOD1(setCurrentDataset, void(int));
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 private:
   Mantid::API::IFunction_sptr m_func;
@@ -55,7 +55,7 @@ private:
 // Mock muon fit property browser
 class MockFitFunctionControl : public IMuonFitFunctionModel {
 public:
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_METHOD1(setFunction, void(const Mantid::API::IFunction_sptr));
   MOCK_METHOD0(runFit, void());
   MOCK_METHOD0(runSequentialFit, void());
@@ -70,7 +70,7 @@ public:
   MOCK_METHOD0(doRemoveGuess, void());
   MOCK_METHOD0(doPlotGuess, void());
   MOCK_CONST_METHOD0(hasGuess, bool());
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 
 class MuonAnalysisFitFunctionPresenterTest : public CxxTest::TestSuite {
diff --git a/qt/scientific_interfaces/test/ReflMeasureTransferStrategyTest.h b/qt/scientific_interfaces/test/ReflMeasureTransferStrategyTest.h
index f1cb3027523b972d7c967b17e18654d121fd823c..c6205fd96bf1409e7fb1bff7292b42f2b9f62554 100644
--- a/qt/scientific_interfaces/test/ReflMeasureTransferStrategyTest.h
+++ b/qt/scientific_interfaces/test/ReflMeasureTransferStrategyTest.h
@@ -18,11 +18,11 @@ using namespace MantidQt::CustomInterfaces;
 class MockReflMeasurementItemSource
     : public MantidQt::CustomInterfaces::ReflMeasurementItemSource {
 public:
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_CONST_METHOD2(obtain, MantidQt::CustomInterfaces::MeasurementItem(
                                  const std::string &, const std::string &));
   MOCK_CONST_METHOD0(clone, MockReflMeasurementItemSource *());
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 
 class ReflMeasureTransferStrategyTest : public CxxTest::TestSuite {
diff --git a/qt/scientific_interfaces/test/ReflMockObjects.h b/qt/scientific_interfaces/test/ReflMockObjects.h
index 38dfce2f47f077dc5f8969b209d3a3f83acec3aa..8acda29338a02459dffc2ade7da20ee4e38b6d97 100644
--- a/qt/scientific_interfaces/test/ReflMockObjects.h
+++ b/qt/scientific_interfaces/test/ReflMockObjects.h
@@ -32,7 +32,7 @@ using namespace MantidQt::CustomInterfaces;
 using namespace Mantid::API;
 using namespace MantidQt::MantidWidgets::DataProcessor;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 /**** Models ****/
 
@@ -385,6 +385,6 @@ public:
   virtual ~MockReflAsciiSaver() = default;
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif /*MANTID_CUSTOMINTERFACES_REFLMOCKOBJECTS_H*/
diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/MockObjects.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/MockObjects.h
index fa478e39529d8f06bfd56063ddb22aebe0075028..23aec0b2749cf26220157ff256ee3864ab628789 100644
--- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/MockObjects.h
+++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/MockObjects.h
@@ -29,7 +29,7 @@ const int ScaleCol = 7;
 const int OptionsCol = 8;
 const int HiddenOptionsCol = 9;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockDataProcessorView : public DataProcessorView {
 public:
@@ -242,6 +242,6 @@ public:
   };
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif /*MANTID_MANTIDWIDGETS_DATAPROCESSORVIEWMOCKOBJECTS_H*/
diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProgressableViewMockObject.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProgressableViewMockObject.h
index 7c028b53a9b6262fb7ab61522c563c11d232c344..1faf7b96e99b83ede7003d856c60fad078269efe 100644
--- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProgressableViewMockObject.h
+++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProgressableViewMockObject.h
@@ -10,11 +10,11 @@ using namespace MantidQt::MantidWidgets::DataProcessor;
 
 class MockProgressableView : public ProgressableView {
 public:
-  DIAG_OFF_SUGGEST_OVERRIDE
+  GNU_DIAG_OFF_SUGGEST_OVERRIDE
   MOCK_METHOD1(setProgress, void(int));
   MOCK_METHOD2(setProgressRange, void(int, int));
   MOCK_METHOD0(clearProgress, void());
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
 };
 
 #endif /* MANTID_MANTIDWIDGETS_PROGRESSABLEVIEWMOCKOBJECT_H */
diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceDockMockObjects.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceDockMockObjects.h
index 48b60d7b1150804422e3deed73db678249b6121f..7d9eec7cb2074be8c734b0bceb51ae5ef5ca796d 100644
--- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceDockMockObjects.h
+++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceDockMockObjects.h
@@ -12,7 +12,7 @@
 
 using namespace MantidQt::MantidWidgets;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockMantidDisplayBase;
 
@@ -103,6 +103,6 @@ public:
   MOCK_METHOD1(notifyFromWorkspaceProvider, void(Flag flag));
 };
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif // MANTIDQT_MANTIDWIDGETS_WORKSPACEDOCKMOCKOBJECTS_H
diff --git a/qt/widgets/common/test/ProjectSaveMockObjects.h b/qt/widgets/common/test/ProjectSaveMockObjects.h
index d9b293c272a8c63e86de63243c3db2b67e82d1e0..892e489f3aec85fccaff5e25142d3d1cd4d7bdb2 100644
--- a/qt/widgets/common/test/ProjectSaveMockObjects.h
+++ b/qt/widgets/common/test/ProjectSaveMockObjects.h
@@ -10,7 +10,7 @@
 using namespace MantidQt::API;
 using namespace MantidQt::MantidWidgets;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class MockProjectSaveView : public IProjectSaveView {
 public:
diff --git a/qt/widgets/legacyqwt/test/SignalRangeTest.h b/qt/widgets/legacyqwt/test/SignalRangeTest.h
index 5f295ef58cbf394f03329191c3e507cbd27b3c01..58a8ab2294f3a14ecb04fd70bbfdf94d3963177a 100644
--- a/qt/widgets/legacyqwt/test/SignalRangeTest.h
+++ b/qt/widgets/legacyqwt/test/SignalRangeTest.h
@@ -12,7 +12,7 @@
 
 #include "MantidAPI/IMDIterator.h"
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 class SignalRangeTest : public CxxTest::TestSuite {
 private:
@@ -86,7 +86,7 @@ private:
     MOCK_CONST_METHOD0(getLinearIndex, size_t());
     MOCK_CONST_METHOD1(isWithinBounds, bool(size_t));
   };
-  DIAG_ON_SUGGEST_OVERRIDE
+  GNU_DIAG_ON_SUGGEST_OVERRIDE
   class NormalizableMockIterator : public MockMDIterator {
   public:
     Mantid::signal_t getNormalizedSignal() const override {
diff --git a/qt/widgets/sliceviewer/test/MockObjects.h b/qt/widgets/sliceviewer/test/MockObjects.h
index 25c8d27b64137ec9e50ab6b9f4bb9a89d00e6d02..7cf27b3efb240b16332be1de3bb259c7663eaef8 100644
--- a/qt/widgets/sliceviewer/test/MockObjects.h
+++ b/qt/widgets/sliceviewer/test/MockObjects.h
@@ -25,7 +25,7 @@ using namespace Mantid::Geometry;
 using namespace Mantid;
 using boost::regex;
 
-DIAG_OFF_SUGGEST_OVERRIDE
+GNU_DIAG_OFF_SUGGEST_OVERRIDE
 
 namespace {
 /*------------------------------------------------------------
@@ -197,6 +197,6 @@ public:
 };
 }
 
-DIAG_ON_SUGGEST_OVERRIDE
+GNU_DIAG_ON_SUGGEST_OVERRIDE
 
 #endif