diff options
author | Bernard Normier <bernard@zeroc.com> | 2014-10-31 15:03:01 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2014-10-31 15:03:01 -0400 |
commit | 1307d3d1626ca3410cb980c1cd4bdad0f0673aac (patch) | |
tree | dddc4eff26a445eafa5916b6a567f06d1c5a2b0c /cpp/src/slice2cpp | |
parent | Fix demo builds caused by ICE-5813 (diff) | |
download | ice-1307d3d1626ca3410cb980c1cd4bdad0f0673aac.tar.bz2 ice-1307d3d1626ca3410cb980c1cd4bdad0f0673aac.tar.xz ice-1307d3d1626ca3410cb980c1cd4bdad0f0673aac.zip |
New IceUtil headers to push and pop pragma disable warning with MSVC and GCC
Diffstat (limited to 'cpp/src/slice2cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index b81d26c9c35..1f7afafb118 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -225,7 +225,8 @@ Slice::Gen::Gen(const string& base, const string& headerExtension, const string& Slice::Gen::~Gen() { - H << "\n\n#endif\n"; + H << "\n\n#include <IceUtil/PopDisableWarnings.h>"; + H << "\n#endif\n"; C << '\n'; if(_impl) @@ -361,8 +362,10 @@ Slice::Gen::generate(const UnitPtr& p) C << _include << '/'; } C << _base << "." << _headerExtension << ">"; + C << "\n#include <IceUtil/PushDisableWarnings.h>"; + H << "\n#include <IceUtil/PushDisableWarnings.h>"; H << "\n#include <Ice/ProxyF.h>"; H << "\n#include <Ice/ObjectF.h>"; H << "\n#include <Ice/Exception.h>"; @@ -435,6 +438,7 @@ Slice::Gen::generate(const UnitPtr& p) } C << "\n#include <IceUtil/Iterator.h>"; + C << "\n#include <IceUtil/PopDisableWarnings.h>"; StringList includes = p->includeFiles(); @@ -450,11 +454,6 @@ Slice::Gen::generate(const UnitPtr& p) H << "\n#include <IceUtil/UndefSysMacros.h>"; - if(_ice) - { - C << "\n#include <IceUtil/DisableWarnings.h>"; - } - // // Emit #include statements for any cpp:include metadata directives // in the top-level Slice file. |