@@ -1469,34 +1469,40 @@ void ClassCompiler::CompileStream(const std::string& path, std::istream& input,
14691469 << " #include <boost/signals2.hpp>" << std::endl << std::endl;
14701470
14711471 oimpl << " #include \" base/exception.hpp\" " << std::endl
1472- << " #include \" base/objectlock.hpp\" " << std::endl
1473- << " #include \" base/utility.hpp\" " << std::endl
1474- << " #include \" base/convert.hpp\" " << std::endl
1475- << " #include \" base/debug.hpp\" " << std::endl
1476- << " #include \" base/dependencygraph.hpp\" " << std::endl
1477- << " #include \" base/logger.hpp\" " << std::endl
1478- << " #include \" base/function.hpp\" " << std::endl
1479- << " #include \" base/configobject.hpp\" " << std::endl
1480- << " #include \" base/configtype.hpp\" " << std::endl
1481- << " #ifdef _MSC_VER" << std::endl
1482- << " #pragma warning( push )" << std::endl
1472+ << " #include \" base/objectlock.hpp\" " << std::endl
1473+ << " #include \" base/utility.hpp\" " << std::endl
1474+ << " #include \" base/convert.hpp\" " << std::endl
1475+ << " #include \" base/debug.hpp\" " << std::endl
1476+ << " #include \" base/dependencygraph.hpp\" " << std::endl
1477+ << " #include \" base/logger.hpp\" " << std::endl
1478+ << " #include \" base/function.hpp\" " << std::endl
1479+ << " #include \" base/configobject.hpp\" " << std::endl
1480+ << " #include \" base/configtype.hpp\" " << std::endl;
1481+
1482+ #ifdef _MSC_VER
1483+ oimpl << " #pragma warning( push )" << std::endl
14831484 << " #pragma warning( disable : 4244 )" << std::endl
1484- << " #pragma warning( disable : 4800 )" << std::endl
1485- << " #else /* _MSC_VER */ " << std::endl
1486- << " #pragma GCC diagnostic push" << std::endl
1485+ << " #pragma warning( disable : 4800 )" << std::endl;
1486+ # elif defined(__GNUC__) && !defined(__clang__)
1487+ oimpl << " #pragma GCC diagnostic push" << std::endl
14871488 << " #pragma GCC diagnostic ignored \" -Wunused-parameter\" " << std::endl
1488- << " #pragma GCC diagnostic ignored \" -Wunused-variable\" " << std::endl
1489- << " #endif /* _MSC_VER */" << std::endl << std::endl;
1490-
1489+ << " #pragma GCC diagnostic ignored \" -Wunused-variable\" " << std::endl;
1490+ #elif defined(__clang__)
1491+ oimpl << " #pragma clang diagnostic push" << std::endl
1492+ << " #pragma clang diagnostic ignored \" -Wunused-parameter\" " << std::endl
1493+ << " #pragma clang diagnostic ignored \" -Wunused-variable\" " << std::endl;
1494+ #endif /* _MSC_VER */
14911495
14921496 ClassCompiler ctx (path, input, oimpl, oheader);
14931497 ctx.Compile ();
14941498
14951499 oheader << " #endif /* " << guard_name << " */" << std::endl;
14961500
1497- oimpl << " #ifdef _MSC_VER" << std::endl
1498- << " #pragma warning ( pop )" << std::endl
1499- << " #else /* _MSC_VER */" << std::endl
1500- << " #pragma GCC diagnostic pop" << std::endl
1501- << " #endif /* _MSC_VER */" << std::endl;
1501+ #ifdef _MSC_VER
1502+ oimpl << " #pragma warning ( pop )" << std::endl;
1503+ #elif defined(__GNUC__) && !defined(__clang__)
1504+ oimpl << " #pragma GCC diagnostic pop" << std::endl;
1505+ #elif defined(__clang__)
1506+ oimpl << " #pragma clang diagnostic pop" << std::endl;
1507+ #endif /* _MSC_VER */
15021508}
0 commit comments