Merge branch 'msvc-warns'
Fix an annoying MSVC warning in SDK headers. Remove wxUSE_IOSTREAMH. See https://github.com/wxWidgets/wxWidgets/pull/1614
This commit is contained in:
@@ -54,9 +54,7 @@
|
||||
#ifdef wxMSVC_VERSION
|
||||
#define wxCOMPILER_PREFIX wxCONCAT(vc, wxMSVC_VERSION)
|
||||
#elif defined(wxMSVC_VERSION_AUTO) || defined(wxMSVC_VERSION_ABI_COMPAT)
|
||||
#if _MSC_VER == 1200
|
||||
#define wxCOMPILER_PREFIX vc60
|
||||
#elif _MSC_VER == 1300
|
||||
#if _MSC_VER == 1300
|
||||
#define wxCOMPILER_PREFIX vc70
|
||||
#elif _MSC_VER == 1310
|
||||
#define wxCOMPILER_PREFIX vc71
|
||||
|
@@ -17,9 +17,9 @@
|
||||
#endif
|
||||
|
||||
// undo what we did in wx/beforestd.h
|
||||
#if defined(__VISUALC__) && __VISUALC__ <= 1201
|
||||
#if defined(__VISUALC__) && __VISUALC__ >= 1910
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // VC++ >= 14.1
|
||||
|
||||
// see beforestd.h for explanation
|
||||
#if defined(HAVE_VISIBILITY) && defined(HAVE_BROKEN_LIBSTDCXX_VISIBILITY)
|
||||
|
@@ -391,18 +391,6 @@
|
||||
// wxWidgets.
|
||||
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
||||
|
||||
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
|
||||
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
|
||||
//
|
||||
// Note that newer compilers (including VC++ 7.1 and later) don't support
|
||||
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
|
||||
//
|
||||
// Default is 0.
|
||||
//
|
||||
// Recommended setting: 0, only set to 1 if you use a really old compiler
|
||||
#define wxUSE_IOSTREAMH 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// non GUI features selection
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -19,32 +19,18 @@
|
||||
it can be included several times.
|
||||
*/
|
||||
|
||||
// VC 7.x isn't as bad as VC6 and doesn't give these warnings but eVC (which
|
||||
// defines _MSC_VER as 1201) does need to be included as it's VC6-like
|
||||
#if defined(__VISUALC__) && __VISUALC__ <= 1201
|
||||
// these warning have to be disabled and not just temporarily disabled
|
||||
// because they will be given at the end of the compilation of the
|
||||
// current source and there is absolutely nothing we can do about them so
|
||||
// disable them before warning(push) below
|
||||
|
||||
// 'foo': unreferenced inline function has been removed
|
||||
#pragma warning(disable:4514)
|
||||
|
||||
// 'function' : function not inlined
|
||||
#pragma warning(disable:4710)
|
||||
|
||||
// 'id': identifier was truncated to 'num' characters in the debug info
|
||||
#pragma warning(disable:4786)
|
||||
|
||||
// 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)
|
||||
|
||||
#if defined(__VISUALC__) && __VISUALC__ >= 1910
|
||||
#pragma warning(push, 1)
|
||||
#endif // VC++ < 7
|
||||
|
||||
// This warning, given when a malloc.h from 10.0.240.0 version of UCRT,
|
||||
// which is used when building projects targeting 8.1 SDK, compiled by MSVS
|
||||
// 2017 or later, is still given even at warning level 1, in spite of it
|
||||
// being level 4, so we have to explicitly disable it here (as we do it
|
||||
// after the warning push pragma, it will be restored after pop).
|
||||
//
|
||||
// expression before comma has no effect; expected expression with side-effect
|
||||
#pragma warning(disable:4548)
|
||||
#endif // VC++ >= 14.1
|
||||
|
||||
/**
|
||||
GCC's visibility support is broken for libstdc++ in some older versions
|
||||
|
@@ -460,21 +460,10 @@ typedef short int WXTYPE;
|
||||
/*
|
||||
Mingw <= 3.4 and all versions of Cygwin don't have std::wostream
|
||||
*/
|
||||
#if (defined(__MINGW32__) && !wxCHECK_GCC_VERSION(4, 0)) || \
|
||||
defined(__CYGWIN__)
|
||||
#define wxNO_WOSTREAM
|
||||
#endif
|
||||
|
||||
/* VC++ doesn't have it in the old iostream library */
|
||||
#if defined(__VISUALC__) && wxUSE_IOSTREAMH
|
||||
#define wxNO_WOSTREAM
|
||||
#endif
|
||||
|
||||
#ifndef wxNO_WOSTREAM
|
||||
#if (!defined(__MINGW32__) || wxCHECK_GCC_VERSION(4, 0)) && \
|
||||
!defined(__CYGWIN__)
|
||||
#define HAVE_WOSTREAM
|
||||
#endif
|
||||
|
||||
#undef wxNO_WOSTREAM
|
||||
#endif /* HAVE_WOSTREAM */
|
||||
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
@@ -849,7 +838,7 @@ typedef short int WXTYPE;
|
||||
|
||||
/* where should i put this? we need to make sure of this as it breaks */
|
||||
/* the <iostream> code. */
|
||||
#if !wxUSE_IOSTREAMH && defined(__WXDEBUG__)
|
||||
#if defined(__WXDEBUG__)
|
||||
# undef wxUSE_DEBUG_NEW_ALWAYS
|
||||
# define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
#endif
|
||||
|
@@ -392,18 +392,6 @@
|
||||
// wxWidgets.
|
||||
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
||||
|
||||
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
|
||||
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
|
||||
//
|
||||
// Note that newer compilers (including VC++ 7.1 and later) don't support
|
||||
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
|
||||
//
|
||||
// Default is 0.
|
||||
//
|
||||
// Recommended setting: 0, only set to 1 if you use a really old compiler
|
||||
#define wxUSE_IOSTREAMH 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// non GUI features selection
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -1,6 +1,6 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/iosfwrap.h
|
||||
// Purpose: includes the correct stream-related forward declarations
|
||||
// Purpose: This file is obsolete, include <iosfwd> directly instead
|
||||
// Author: Jan van Dijk <jan@etpmod.phys.tue.nl>
|
||||
// Modified by:
|
||||
// Created: 18.12.2002
|
||||
@@ -10,12 +10,7 @@
|
||||
|
||||
#if wxUSE_STD_IOSTREAM
|
||||
|
||||
#if wxUSE_IOSTREAMH
|
||||
// There is no pre-ANSI iosfwd header so we include the full declarations.
|
||||
# include <iostream.h>
|
||||
#else
|
||||
# include <iosfwd>
|
||||
#endif
|
||||
#include <iosfwd>
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
# include "wx/msw/winundef.h"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/ioswrap.h
|
||||
// Purpose: includes the correct iostream headers for current compiler
|
||||
// Purpose: This file is obsolete, include <iostream> directly instead.
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 03.02.99
|
||||
@@ -12,11 +12,7 @@
|
||||
|
||||
#include "wx/beforestd.h"
|
||||
|
||||
#if wxUSE_IOSTREAMH
|
||||
# include <iostream.h>
|
||||
#else
|
||||
# include <iostream>
|
||||
#endif
|
||||
#include <iostream>
|
||||
|
||||
#include "wx/afterstd.h"
|
||||
|
||||
|
@@ -392,18 +392,6 @@
|
||||
// wxWidgets.
|
||||
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
||||
|
||||
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
|
||||
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
|
||||
//
|
||||
// Note that newer compilers (including VC++ 7.1 and later) don't support
|
||||
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
|
||||
//
|
||||
// Default is 0.
|
||||
//
|
||||
// Recommended setting: 0, only set to 1 if you use a really old compiler
|
||||
#define wxUSE_IOSTREAMH 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// non GUI features selection
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -392,18 +392,6 @@
|
||||
// wxWidgets.
|
||||
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
||||
|
||||
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
|
||||
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
|
||||
//
|
||||
// Note that newer compilers (including VC++ 7.1 and later) don't support
|
||||
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
|
||||
//
|
||||
// Default is 0.
|
||||
//
|
||||
// Recommended setting: 0, only set to 1 if you use a really old compiler
|
||||
#define wxUSE_IOSTREAMH 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// non GUI features selection
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -398,18 +398,6 @@
|
||||
// wxWidgets.
|
||||
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
||||
|
||||
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
|
||||
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
|
||||
//
|
||||
// Note that newer compilers (including VC++ 7.1 and later) don't support
|
||||
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
|
||||
//
|
||||
// Default is 0.
|
||||
//
|
||||
// Recommended setting: 0, only set to 1 if you use a really old compiler
|
||||
#define wxUSE_IOSTREAMH 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// non GUI features selection
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -529,32 +529,9 @@
|
||||
#include "wx/chkconf.h"
|
||||
|
||||
|
||||
/*
|
||||
some compilers don't support iostream.h any longer, while some of theme
|
||||
are not updated with <iostream> yet, so override the users setting here
|
||||
in such case.
|
||||
*/
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1310)
|
||||
# undef wxUSE_IOSTREAMH
|
||||
# define wxUSE_IOSTREAMH 0
|
||||
#elif defined(__MINGW32__)
|
||||
# undef wxUSE_IOSTREAMH
|
||||
# define wxUSE_IOSTREAMH 0
|
||||
#endif /* compilers with/without iostream.h */
|
||||
|
||||
/*
|
||||
old C++ headers (like <iostream.h>) declare classes in the global namespace
|
||||
while the new, standard ones (like <iostream>) do it in std:: namespace,
|
||||
unless it's an old gcc version.
|
||||
|
||||
using this macro allows constuctions like "wxSTD iostream" to work in
|
||||
either case
|
||||
*/
|
||||
#if !wxUSE_IOSTREAMH && (!defined(__GNUC__) || ( __GNUC__ > 2 ) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
# define wxSTD std::
|
||||
#else
|
||||
# define wxSTD
|
||||
#endif
|
||||
/* These macros exist only for compatibility, don't use them in the new code */
|
||||
#define wxUSE_IOSTREAMH 0
|
||||
#define wxSTD std::
|
||||
|
||||
/* On OpenVMS with the most recent HP C++ compiler some function (i.e. wscanf)
|
||||
* are only available in the std-namespace. (BUG???)
|
||||
|
@@ -388,18 +388,6 @@
|
||||
// wxWidgets.
|
||||
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
||||
|
||||
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
|
||||
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
|
||||
//
|
||||
// Note that newer compilers (including VC++ 7.1 and later) don't support
|
||||
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
|
||||
//
|
||||
// Default is 0.
|
||||
//
|
||||
// Recommended setting: 0, only set to 1 if you use a really old compiler
|
||||
#define wxUSE_IOSTREAMH 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// non GUI features selection
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -391,18 +391,6 @@
|
||||
// wxWidgets.
|
||||
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
||||
|
||||
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
|
||||
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
|
||||
//
|
||||
// Note that newer compilers (including VC++ 7.1 and later) don't support
|
||||
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
|
||||
//
|
||||
// Default is 0.
|
||||
//
|
||||
// Recommended setting: 0, only set to 1 if you use a really old compiler
|
||||
#define wxUSE_IOSTREAMH 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// non GUI features selection
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user