diff options
29 files changed, 62 insertions, 46 deletions
diff --git a/cpp/demo/Freeze/library/Grammar.y b/cpp/demo/Freeze/library/Grammar.y index 8ad6c26197d..6343cd955d3 100644 --- a/cpp/demo/Freeze/library/Grammar.y +++ b/cpp/demo/Freeze/library/Grammar.y @@ -12,7 +12,7 @@ #include <Ice/Ice.h> #include <Parser.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label # pragma warning( disable : 4102 ) diff --git a/cpp/demo/Freeze/library/Parser.h b/cpp/demo/Freeze/library/Parser.h index 68c3d47045d..57543b35768 100644 --- a/cpp/demo/Freeze/library/Parser.h +++ b/cpp/demo/Freeze/library/Parser.h @@ -20,7 +20,9 @@ # define isatty _isatty # define fileno _fileno // '_isatty' : inconsistent dll linkage. dllexport assumed. -# pragma warning( disable : 4273 ) +# ifdef _MSC_VER +# pragma warning( disable : 4273 ) +# endif #endif // diff --git a/cpp/demo/Freeze/library/Scanner.l b/cpp/demo/Freeze/library/Scanner.l index ca774a7293e..b9c9509ca70 100644 --- a/cpp/demo/Freeze/library/Scanner.l +++ b/cpp/demo/Freeze/library/Scanner.l @@ -13,7 +13,7 @@ #include <Parser.h> #include <Grammar.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some flex versions: // warning C4003: not enough actual parameters for macro 'yywrap' # pragma warning( disable : 4003 ) diff --git a/cpp/demo/Freeze/phonebook/Grammar.y b/cpp/demo/Freeze/phonebook/Grammar.y index af358c4018e..ae49e12fb11 100644 --- a/cpp/demo/Freeze/phonebook/Grammar.y +++ b/cpp/demo/Freeze/phonebook/Grammar.y @@ -12,7 +12,7 @@ #include <Ice/Ice.h> #include <Parser.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label # pragma warning( disable : 4102 ) diff --git a/cpp/demo/Freeze/phonebook/Parser.h b/cpp/demo/Freeze/phonebook/Parser.h index ebc821d6c31..cc141ec09e4 100644 --- a/cpp/demo/Freeze/phonebook/Parser.h +++ b/cpp/demo/Freeze/phonebook/Parser.h @@ -20,7 +20,9 @@ # define isatty _isatty # define fileno _fileno // '_isatty' : inconsistent dll linkage. dllexport assumed. -# pragma warning( disable : 4273 ) +# ifdef _MSC_VER +# pragma warning( disable : 4273 ) +# endif #endif // diff --git a/cpp/demo/Freeze/phonebook/Scanner.l b/cpp/demo/Freeze/phonebook/Scanner.l index bace3f7f8c4..8848652d1d0 100644 --- a/cpp/demo/Freeze/phonebook/Scanner.l +++ b/cpp/demo/Freeze/phonebook/Scanner.l @@ -13,7 +13,7 @@ #include <Parser.h> #include <Grammar.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some flex versions: // warning C4003: not enough actual parameters for macro 'yywrap' # pragma warning( disable : 4003 ) diff --git a/cpp/include/Ice/Handle.h b/cpp/include/Ice/Handle.h index 612841f8764..1f21eab8e41 100644 --- a/cpp/include/Ice/Handle.h +++ b/cpp/include/Ice/Handle.h @@ -65,7 +65,7 @@ public: } } -#ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? +#ifdef _MSC_VER // COMPILERBUG: Is VC++ or GNU C++ right here??? template<> Handle(const Handle<T>& r) #else @@ -150,7 +150,7 @@ public: return *this; } -#ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? +#ifdef _MSC_VER // COMPILERBUG: Is VC++ or GNU C++ right here??? template<> Handle& operator=(const Handle<T>& r) #else diff --git a/cpp/include/Ice/ProxyHandle.h b/cpp/include/Ice/ProxyHandle.h index 416bdb6a931..1d3cecc3853 100644 --- a/cpp/include/Ice/ProxyHandle.h +++ b/cpp/include/Ice/ProxyHandle.h @@ -155,7 +155,7 @@ public: } } -#ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? +#ifdef _MSC_VER // COMPILERBUG: Is VC++ or GNU C++ right here??? template<> ProxyHandle(const ProxyHandle<T>& r) #else @@ -237,7 +237,7 @@ public: return *this; } -#ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? +#ifdef _MSC_VER // COMPILERBUG: Is VC++ or GNU C++ right here??? template<> ProxyHandle& operator=(const ProxyHandle<T>& r) #else diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h index 10d925bd265..2149da40357 100644 --- a/cpp/include/IceUtil/Config.h +++ b/cpp/include/IceUtil/Config.h @@ -103,20 +103,22 @@ # include <windows.h> -// '...' : forcing value to bool 'true' or 'false' (performance warning) -# pragma warning( disable : 4800 ) -// ... identifier was truncated to '255' characters in the debug information -# pragma warning( disable : 4786 ) -// 'this' : used in base member initializer list -# pragma warning( disable : 4355 ) -// class ... needs to have dll-interface to be used by clients of class ... -# pragma warning( disable : 4251 ) -// ... : inherits ... via dominance -# pragma warning( disable : 4250 ) -// non dll-interface class ... used as base for dll-interface class ... -# pragma warning( disable : 4275 ) -// ...: decorated name length exceeded, name was truncated -# pragma warning( disable : 4503 ) +# ifdef _MSC_VER +// '...' : forcing value to bool 'true' or 'false' (performance warning) +# pragma warning( disable : 4800 ) +// ... identifier was truncated to '255' characters in the debug information +# pragma warning( disable : 4786 ) +// 'this' : used in base member initializer list +# pragma warning( disable : 4355 ) +// class ... needs to have dll-interface to be used by clients of class ... +# pragma warning( disable : 4251 ) +// ... : inherits ... via dominance +# pragma warning( disable : 4250 ) +// non dll-interface class ... used as base for dll-interface class ... +# pragma warning( disable : 4275 ) +// ...: decorated name length exceeded, name was truncated +# pragma warning( disable : 4503 ) +# endif #endif // diff --git a/cpp/include/IceUtil/Handle.h b/cpp/include/IceUtil/Handle.h index 48916b9f513..cfc2fadada0 100644 --- a/cpp/include/IceUtil/Handle.h +++ b/cpp/include/IceUtil/Handle.h @@ -136,7 +136,7 @@ public: } } -#ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? +#ifdef _MSC_VER // COMPILERBUG: Is VC++ or GNU C++ right here??? template<> Handle(const Handle<T>& r) #else @@ -200,7 +200,7 @@ public: return *this; } -#ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? +#ifdef _MSC_VER // COMPILERBUG: Is VC++ or GNU C++ right here??? template<> Handle& operator=(const Handle<T>& r) #else diff --git a/cpp/src/FreezeScript/Grammar.y b/cpp/src/FreezeScript/Grammar.y index 310ccf4d996..79f935cbb1f 100644 --- a/cpp/src/FreezeScript/Grammar.y +++ b/cpp/src/FreezeScript/Grammar.y @@ -11,7 +11,7 @@ #include <FreezeScript/GrammarUtil.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label # pragma warning( disable : 4102 ) diff --git a/cpp/src/FreezeScript/Scanner.l b/cpp/src/FreezeScript/Scanner.l index 203841fba05..7756998a2bc 100644 --- a/cpp/src/FreezeScript/Scanner.l +++ b/cpp/src/FreezeScript/Scanner.l @@ -18,7 +18,7 @@ #include <map> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some flex versions: // warning C4003: not enough actual parameters for macro 'yywrap' # pragma warning( disable : 4003 ) diff --git a/cpp/src/IceGrid/Grammar.y b/cpp/src/IceGrid/Grammar.y index 75d6e5376e9..2b788edafa8 100644 --- a/cpp/src/IceGrid/Grammar.y +++ b/cpp/src/IceGrid/Grammar.y @@ -12,7 +12,7 @@ #include <Ice/Ice.h> #include <IceGrid/Parser.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label # pragma warning( disable : 4102 ) diff --git a/cpp/src/IceGrid/Parser.h b/cpp/src/IceGrid/Parser.h index 42c16883d36..f72ab066b6f 100644 --- a/cpp/src/IceGrid/Parser.h +++ b/cpp/src/IceGrid/Parser.h @@ -20,7 +20,9 @@ # define isatty _isatty # define fileno _fileno // '_isatty' : inconsistent dll linkage. dllexport assumed. -# pragma warning( disable : 4273 ) +# ifdef _MSC_VER +# pragma warning( disable : 4273 ) +# endif #endif // diff --git a/cpp/src/IceGrid/Scanner.l b/cpp/src/IceGrid/Scanner.l index cbe7451d0d0..b68242503f8 100644 --- a/cpp/src/IceGrid/Scanner.l +++ b/cpp/src/IceGrid/Scanner.l @@ -13,7 +13,7 @@ #include <IceGrid/Parser.h> #include <IceGrid/Grammar.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some flex versions: // warning C4003: not enough actual parameters for macro 'yywrap' # pragma warning( disable : 4003 ) diff --git a/cpp/src/IcePack/Grammar.y b/cpp/src/IcePack/Grammar.y index a023c17ce83..04312e088bf 100644 --- a/cpp/src/IcePack/Grammar.y +++ b/cpp/src/IcePack/Grammar.y @@ -12,7 +12,7 @@ #include <Ice/Ice.h> #include <IcePack/Parser.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label # pragma warning( disable : 4102 ) diff --git a/cpp/src/IcePack/Parser.h b/cpp/src/IcePack/Parser.h index 3baa65954bc..412deff5062 100644 --- a/cpp/src/IcePack/Parser.h +++ b/cpp/src/IcePack/Parser.h @@ -20,7 +20,9 @@ # define isatty _isatty # define fileno _fileno // '_isatty' : inconsistent dll linkage. dllexport assumed. -# pragma warning( disable : 4273 ) +# ifdef _MSC_VER +# pragma warning( disable : 4273 ) +# endif #endif // diff --git a/cpp/src/IcePack/Scanner.l b/cpp/src/IcePack/Scanner.l index bd8f650e5d9..3c1765f7b61 100644 --- a/cpp/src/IcePack/Scanner.l +++ b/cpp/src/IcePack/Scanner.l @@ -13,7 +13,7 @@ #include <IcePack/Parser.h> #include <IcePack/Grammar.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some flex versions: // warning C4003: not enough actual parameters for macro 'yywrap' # pragma warning( disable : 4003 ) diff --git a/cpp/src/IceStorm/Grammar.y b/cpp/src/IceStorm/Grammar.y index c7fceec3505..1fb6d97ba64 100644 --- a/cpp/src/IceStorm/Grammar.y +++ b/cpp/src/IceStorm/Grammar.y @@ -12,7 +12,7 @@ #include <Ice/Ice.h> #include <IceStorm/Parser.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label # pragma warning( disable : 4102 ) diff --git a/cpp/src/IceStorm/Parser.h b/cpp/src/IceStorm/Parser.h index 1c0e6cb3b97..9f41a47bb03 100644 --- a/cpp/src/IceStorm/Parser.h +++ b/cpp/src/IceStorm/Parser.h @@ -19,7 +19,9 @@ # define isatty _isatty # define fileno _fileno // '_isatty' : inconsistent dll linkage. dllexport assumed. -# pragma warning( disable : 4273 ) +# ifdef _MSC_VER +# pragma warning( disable : 4273 ) +# endif #endif // diff --git a/cpp/src/IceStorm/Scanner.l b/cpp/src/IceStorm/Scanner.l index cbc3d003dad..e93debacfa7 100644 --- a/cpp/src/IceStorm/Scanner.l +++ b/cpp/src/IceStorm/Scanner.l @@ -13,7 +13,7 @@ #include <IceStorm/Parser.h> #include <IceStorm/Grammar.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some flex versions: // warning C4003: not enough actual parameters for macro 'yywrap' # pragma warning( disable : 4003 ) diff --git a/cpp/src/IceStorm/WeightedGraph.cpp b/cpp/src/IceStorm/WeightedGraph.cpp index 2a6eb94ee3c..1a383578b54 100644 --- a/cpp/src/IceStorm/WeightedGraph.cpp +++ b/cpp/src/IceStorm/WeightedGraph.cpp @@ -20,7 +20,7 @@ using namespace IceStorm; namespace IceStorm { -#ifdef _WIN32 +#ifdef _MSC_VER # pragma warning(disable:4786) #endif diff --git a/cpp/src/Slice/Grammar.y b/cpp/src/Slice/Grammar.y index a3f12a11242..b0340cd4aca 100644 --- a/cpp/src/Slice/Grammar.y +++ b/cpp/src/Slice/Grammar.y @@ -12,7 +12,7 @@ #include <Slice/GrammarUtil.h> #include <IceUtil/UUID.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label # pragma warning( disable : 4102 ) diff --git a/cpp/src/Slice/Scanner.l b/cpp/src/Slice/Scanner.l index 101d87e108a..5487e8d4601 100644 --- a/cpp/src/Slice/Scanner.l +++ b/cpp/src/Slice/Scanner.l @@ -16,7 +16,7 @@ #include <stdlib.h> #include <math.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some flex versions: // warning C4003: not enough actual parameters for macro 'yywrap' # pragma warning( disable : 4003 ) diff --git a/cpp/src/icecpp/cexp.y b/cpp/src/icecpp/cexp.y index ca4de3d6359..370c61b910a 100644 --- a/cpp/src/icecpp/cexp.y +++ b/cpp/src/icecpp/cexp.y @@ -109,7 +109,7 @@ struct arglist { #define HOST_BITS_PER_WIDE_INT (CHAR_BIT * sizeof (HOST_WIDE_INT)) #endif -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label # pragma warning( disable : 4102 ) diff --git a/cpp/src/icecpp/config.h b/cpp/src/icecpp/config.h index 2922517058d..5eacee9d5f1 100644 --- a/cpp/src/icecpp/config.h +++ b/cpp/src/icecpp/config.h @@ -26,8 +26,10 @@ #elif defined(_WIN32) # include <malloc.h> # include <io.h> -# pragma warning( disable : 4018 ) -# pragma warning( disable : 4244 ) +# ifdef _MSC_VER +# pragma warning( disable : 4018 ) +# pragma warning( disable : 4244 ) +# endif # define alloca _alloca #endif diff --git a/cpp/test/Freeze/complex/Grammar.y b/cpp/test/Freeze/complex/Grammar.y index 9f4557a2827..237f44a662c 100644 --- a/cpp/test/Freeze/complex/Grammar.y +++ b/cpp/test/Freeze/complex/Grammar.y @@ -12,7 +12,7 @@ #include <NodeI.h> #include <Parser.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label # pragma warning( disable : 4102 ) diff --git a/cpp/test/Freeze/complex/Parser.h b/cpp/test/Freeze/complex/Parser.h index 6a9a091e44d..e8c8982fb8b 100644 --- a/cpp/test/Freeze/complex/Parser.h +++ b/cpp/test/Freeze/complex/Parser.h @@ -17,7 +17,9 @@ # define isatty _isatty # define fileno _fileno // '_isatty' : inconsistent dll linkage. dllexport assumed. -# pragma warning( disable : 4273 ) +# ifdef _MSC_VER +# pragma warning( disable : 4273 ) +# endif #endif // diff --git a/cpp/test/Freeze/complex/Scanner.l b/cpp/test/Freeze/complex/Scanner.l index 94ef388e412..f125526c281 100644 --- a/cpp/test/Freeze/complex/Scanner.l +++ b/cpp/test/Freeze/complex/Scanner.l @@ -14,7 +14,7 @@ #include <Grammar.h> #include <NodeI.h> -#ifdef _WIN32 +#ifdef _MSC_VER // I get these warnings from some flex versions: // warning C4003: not enough actual parameters for macro 'yywrap' # pragma warning( disable : 4003 ) |