diff --git a/include/wx/afterstd.h b/include/wx/afterstd.h index 16075fe5d7..1c89d14758 100644 --- a/include/wx/afterstd.h +++ b/include/wx/afterstd.h @@ -18,24 +18,7 @@ // undo what we did in wx/beforestd.h #if defined(__VISUALC__) && __VISUALC__ <= 1201 - // MSVC 5 does not have this - #if _MSC_VER > 1100 - #pragma warning(pop) - #else - // 'expression' : signed/unsigned mismatch - #pragma warning(default:4018) - - // 'identifier' : unreferenced formal parameter - #pragma warning(default:4100) - - // 'conversion' : conversion from 'type1' to 'type2', - // possible loss of data - #pragma warning(default:4244) - - // C++ language change: to explicitly specialize class template - // 'identifier' use the following syntax - #pragma warning(default:4663) - #endif + #pragma warning(pop) #endif // see beforestd.h for explanation diff --git a/include/wx/beforestd.h b/include/wx/beforestd.h index cc335d317b..45c5b5bcba 100644 --- a/include/wx/beforestd.h +++ b/include/wx/beforestd.h @@ -36,31 +36,14 @@ // 'id': identifier was truncated to 'num' characters in the debug info #pragma warning(disable:4786) - // MSVC 5 does not have this - #if __VISUALC__ > 1100 - // we have to disable (and reenable in afterstd.h) this one because, - // even though it is of level 4, it is not disabled by warning(push, 1) - // below for VC7.1! + // we have to disable (and reenable in afterstd.h) this one because, + // even though it is of level 4, it is not disabled by warning(push, 1) + // below for VC7.1! - // unreachable code - #pragma warning(disable:4702) + // unreachable code + #pragma warning(disable:4702) - #pragma warning(push, 1) - #else // VC 5 - // 'expression' : signed/unsigned mismatch - #pragma warning(disable:4018) - - // 'identifier' : unreferenced formal parameter - #pragma warning(disable:4100) - - // 'conversion' : conversion from 'type1' to 'type2', - // possible loss of data - #pragma warning(disable:4244) - - // C++ language change: to explicitly specialize class template - // 'identifier' use the following syntax - #pragma warning(disable:4663) - #endif + #pragma warning(push, 1) #endif // VC++ < 7 /** diff --git a/include/wx/confbase.h b/include/wx/confbase.h index da71e5a924..4d4403fa33 100644 --- a/include/wx/confbase.h +++ b/include/wx/confbase.h @@ -51,8 +51,7 @@ class WXDLLIMPEXP_FWD_BASE wxArrayString; // not all compilers can deal with template Read/Write() methods, define this // symbol if the template functions are available -#if (!defined(__VISUALC__) || __VISUALC__ > 1200) && \ - !defined( __VMS ) && \ +#if !defined( __VMS ) && \ !(defined(__HP_aCC) && defined(__hppa)) #define wxHAS_CONFIG_TEMPLATE_RW #endif diff --git a/include/wx/defs.h b/include/wx/defs.h index 4283960b07..d5b7f407b6 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -1267,9 +1267,7 @@ inline wxUIntPtr wxPtrToUInt(const void *p) doing here. Same thing with icc with -Wall. */ #ifdef __VISUALC__ - #if __VISUALC__ >= 1200 - #pragma warning(push) - #endif + #pragma warning(push) /* pointer truncation from '' to '' */ #pragma warning(disable: 4311) #elif defined(__INTELC__) @@ -1280,7 +1278,7 @@ inline wxUIntPtr wxPtrToUInt(const void *p) return wx_reinterpret_cast(wxUIntPtr, p); -#if (defined(__VISUALC__) && __VISUALC__ >= 1200) || defined(__INTELC__) +#if defined(__VISUALC__) || defined(__INTELC__) #pragma warning(pop) #endif } @@ -1288,9 +1286,7 @@ inline wxUIntPtr wxPtrToUInt(const void *p) inline void *wxUIntToPtr(wxUIntPtr p) { #ifdef __VISUALC__ - #if __VISUALC__ >= 1200 - #pragma warning(push) - #endif + #pragma warning(push) /* conversion to type of greater size */ #pragma warning(disable: 4312) #elif defined(__INTELC__) @@ -1301,7 +1297,7 @@ inline void *wxUIntToPtr(wxUIntPtr p) return wx_reinterpret_cast(void *, p); -#if (defined(__VISUALC__) && __VISUALC__ >= 1200) || defined(__INTELC__) +#if defined(__VISUALC__) || defined(__INTELC__) #pragma warning(pop) #endif } diff --git a/include/wx/memory.h b/include/wx/memory.h index 89a21b6b05..401835378c 100644 --- a/include/wx/memory.h +++ b/include/wx/memory.h @@ -42,18 +42,13 @@ WXDLLIMPEXP_BASE void wxDebugFree(void * buf, bool isVect = false); #if defined(__SUNCC__) #define wxUSE_ARRAY_MEMORY_OPERATORS 0 -#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) ) - #define wxUSE_ARRAY_MEMORY_OPERATORS 1 #elif defined (__SGI_CC_) // only supported by -n32 compilers #ifndef __EDG_ABI_COMPATIBILITY_VERSION #define wxUSE_ARRAY_MEMORY_OPERATORS 0 #endif -#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) ) - #define wxUSE_ARRAY_MEMORY_OPERATORS 1 #else - // ::operator new[] is a recent C++ feature, so assume it's not supported - #define wxUSE_ARRAY_MEMORY_OPERATORS 0 + #define wxUSE_ARRAY_MEMORY_OPERATORS 1 #endif // devik 2000-8-29: All new/delete ops are now inline because they can't diff --git a/include/wx/msw/libraries.h b/include/wx/msw/libraries.h index 86e47195d1..abd0046a74 100644 --- a/include/wx/msw/libraries.h +++ b/include/wx/msw/libraries.h @@ -18,8 +18,7 @@ * support a way to do that. */ -/* VC++ 5 didn't include oleacc.lib, though it came with the PSDK */ -#if defined __VISUALC__ && (wxUSE_ACCESSIBILITY || __VISUALC__ >= 1200) +#if defined __VISUALC__ && wxUSE_ACCESSIBILITY #pragma comment(lib, "oleacc") #endif diff --git a/include/wx/msw/missing.h b/include/wx/msw/missing.h index 6e6d1a6707..7e4fef87d4 100644 --- a/include/wx/msw/missing.h +++ b/include/wx/msw/missing.h @@ -141,74 +141,6 @@ #define QS_ALLPOSTMESSAGE 0 #endif -/* - * The following are required for VC++ 5 when the PSDK is not available. - */ - -#if defined __VISUALC__ && __VISUALC__ <= 1100 - -#ifndef VER_NT_WORKSTATION - -typedef struct _OSVERSIONINFOEXA { - DWORD dwOSVersionInfoSize; - DWORD dwMajorVersion; - DWORD dwMinorVersion; - DWORD dwBuildNumber; - DWORD dwPlatformId; - CHAR szCSDVersion[128]; - WORD wServicePackMajor; - WORD wServicePackMinor; - WORD wSuiteMask; - BYTE wProductType; - BYTE wReserved; -} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA; -typedef struct _OSVERSIONINFOEXW { - DWORD dwOSVersionInfoSize; - DWORD dwMajorVersion; - DWORD dwMinorVersion; - DWORD dwBuildNumber; - DWORD dwPlatformId; - WCHAR szCSDVersion[128]; - WORD wServicePackMajor; - WORD wServicePackMinor; - WORD wSuiteMask; - BYTE wProductType; - BYTE wReserved; -} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW; - -#ifdef UNICODE -typedef OSVERSIONINFOW OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO; -typedef OSVERSIONINFOEXW OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX; -#else -typedef OSVERSIONINFOA OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO; -typedef OSVERSIONINFOEXA OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX; -#endif - -#endif // defined VER_NT_WORKSTATION - -#ifndef CP_SYMBOL - #define CP_SYMBOL 42 -#endif - -// NMLVCUSTOMDRAW originally didn't have the iSubItem member. It was added -// with IE4, as was IPN_FIRST which is used as a test :-(. -// -#ifndef IPN_FIRST - -typedef struct wxtagNMLVCUSTOMDRAW_ { - NMCUSTOMDRAW nmcd; - COLORREF clrText; - COLORREF clrTextBk; - int iSubItem; -} wxNMLVCUSTOMDRAW_, *wxLPNMLVCUSTOMDRAW_; - -#define NMLVCUSTOMDRAW wxNMLVCUSTOMDRAW_ -#define LPNMLVCUSTOMDRAW wxLPNMLVCUSTOMDRAW_ - -#endif // defined IPN_FIRST - -#endif // defined __VISUALC__ && __VISUALC__ <= 1100 - // ---------------------------------------------------------------------------- // menu stuff // ---------------------------------------------------------------------------- diff --git a/include/wx/msw/msvcrt.h b/include/wx/msw/msvcrt.h index e92a88d841..38a4582e25 100644 --- a/include/wx/msw/msvcrt.h +++ b/include/wx/msw/msvcrt.h @@ -22,7 +22,7 @@ // use debug CRT functions for memory leak detections in VC++ 5.0+ in debug // builds #undef wxUSE_VC_CRTDBG -#if defined(_DEBUG) && defined(__VISUALC__) && (__VISUALC__ >= 1000) \ +#if defined(_DEBUG) && defined(__VISUALC__) \ && !defined(UNDER_CE) // it doesn't combine well with wxWin own memory debugging methods #if !wxUSE_GLOBAL_MEMORY_OPERATORS && !wxUSE_MEMORY_TRACING && !defined(__NO_VC_CRTDBG__) diff --git a/include/wx/msw/ole/oleutils.h b/include/wx/msw/ole/oleutils.h index c9f7eb88c8..521366b9f0 100644 --- a/include/wx/msw/ole/oleutils.h +++ b/include/wx/msw/ole/oleutils.h @@ -191,7 +191,7 @@ private: // VZ: I don't know it's not done for compilers other than VC++ but I leave it // as is. Please note, though, that tracing OLE interface calls may be // incredibly useful when debugging OLE programs. -#if defined(__WXDEBUG__) && (( defined(__VISUALC__) && (__VISUALC__ >= 1000) )) +#if defined(__WXDEBUG__) && defined(__VISUALC__) // ---------------------------------------------------------------------------- // All OLE specific log functions have DebugTrace level (as LogTrace) // ---------------------------------------------------------------------------- diff --git a/include/wx/msw/seh.h b/include/wx/msw/seh.h index d4bdf1f2f9..d00efd4962 100644 --- a/include/wx/msw/seh.h +++ b/include/wx/msw/seh.h @@ -18,7 +18,7 @@ extern unsigned long wxGlobalSEHandler(EXCEPTION_POINTERS *pExcPtrs); // helper macro for wxSEH_HANDLE -#if defined(__BORLANDC__) || (defined(__VISUALC__) && (__VISUALC__ <= 1200)) +#if defined(__BORLANDC__) // some compilers don't understand that this code is unreachable and warn // about no value being returned from the function without it, so calm them // down diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index b660324e67..6146e7e3f4 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -33,9 +33,6 @@ class WXDLLIMPEXP_CORE wxWindowMSW : public wxWindowBase friend class wxSpinCtrl; friend class wxSlider; friend class wxRadioBox; -#if defined __VISUALC__ && __VISUALC__ <= 1200 - friend class wxWindowMSW; -#endif public: wxWindowMSW() { Init(); } diff --git a/include/wx/stringimpl.h b/include/wx/stringimpl.h index cf433f736a..e46bb800de 100644 --- a/include/wx/stringimpl.h +++ b/include/wx/stringimpl.h @@ -115,7 +115,7 @@ struct WXDLLIMPEXP_BASE wxStringData void Lock() { if ( !IsEmpty() ) nRefs++; } // VC++ will refuse to inline Unlock but profiling shows that it is wrong -#if defined(__VISUALC__) && (__VISUALC__ >= 1200) +#if defined(__VISUALC__) __forceinline #endif // VC++ free must take place in same DLL as allocation when using non dll @@ -327,7 +327,7 @@ public: { return wxStdString(c_str(), length()); } #endif -#if defined(__VISUALC__) && (__VISUALC__ >= 1200) +#if defined(__VISUALC__) // disable warning about Unlock() below not being inlined (first, it // seems to be inlined nevertheless and second, even if it isn't, there // is nothing we can do about this @@ -341,7 +341,7 @@ public: GetStringData()->Unlock(); } -#if defined(__VISUALC__) && (__VISUALC__ >= 1200) +#if defined(__VISUALC__) #pragma warning(pop) #endif diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index 2c0e660378..89d783b84d 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -45,13 +45,12 @@ wxDEFINE_EVENT( wxEVT_DIALUP_CONNECTED, wxDialUpEvent ); wxDEFINE_EVENT( wxEVT_DIALUP_DISCONNECTED, wxDialUpEvent ); -// Doesn't yet compile under VC++ 4, BC++ +// Doesn't yet compile under BC++ // Wine: no wininet.h #if (!defined(__BORLANDC__) || (__BORLANDC__>=0x550)) && \ (!defined(__GNUWIN32__) || wxCHECK_W32API_VERSION(0, 5)) && \ !defined(__GNUWIN32_OLD__) && \ - !defined(__WINE__) && \ - (!defined(__VISUALC__) || (__VISUALC__ >= 1020)) + !defined(__WINE__) #include #include diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index f60a106005..596ca46a49 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -49,7 +49,7 @@ #include "wx/msw/ole/oleutils.h" #include "wx/msw/ole/safearray.h" -#if defined(__VISUALC__) && (__VISUALC__ > 1000) +#if defined(__VISUALC__) #include #endif @@ -561,7 +561,7 @@ wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant, long fla #if wxUSE_DATAOBJ -#if wxDEBUG_LEVEL && (( defined(__VISUALC__) && (__VISUALC__ > 1000) )) +#if wxDEBUG_LEVEL && defined(__VISUALC__) static wxString GetIidName(REFIID riid) { // an association between symbolic name and numeric value of an IID diff --git a/tests/hashes/hashes.cpp b/tests/hashes/hashes.cpp index 1894b40459..b9553f098e 100644 --- a/tests/hashes/hashes.cpp +++ b/tests/hashes/hashes.cpp @@ -25,8 +25,7 @@ #include "wx/hashmap.h" #include "wx/hashset.h" -#if defined wxLongLong_t && !defined wxLongLongIsLong && \ - (!defined __VISUALC__ || __VISUALC__ > 1100) // doesn't work on VC5 +#if defined wxLongLong_t && !defined wxLongLongIsLong #define TEST_LONGLONG #endif @@ -468,12 +467,6 @@ void HashesTestCase::LLongHashMapTest() { HashMapTest(); } void HashesTestCase::ULLongHashMapTest() { HashMapTest(); } #endif -#ifdef __VISUALC__ - #if __VISUALC__ <= 1200 - #pragma warning(disable:4284) // operator->() returns a non-UDT - #endif -#endif // __VISUALC__ - // test compilation of basic set types WX_DECLARE_HASH_SET( int*, wxPointerHash, wxPointerEqual, myPtrHashSet ); WX_DECLARE_HASH_SET( long, wxIntegerHash, wxIntegerEqual, myLongHashSet );