Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
#14826: Eliminate build warning #809 regarding exceptions in virtual destructors of STL base classes, with MSVC 2012/11.0 + ICC 13.0.1
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  19 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
wxTrac  
View profile  
 More options Nov 13 2012, 10:47 pm
From: "wxTrac" <nore...@wxsite.net>
Date: Wed, 14 Nov 2012 03:46:58 -0000
Local: Tues, Nov 13 2012 10:46 pm
Subject: #14826: Eliminate build warning #809 regarding exceptions in virtual destructors of STL base classes, with MSVC 2012/11.0 + ICC 13.0.1
Ticket URL: <http://trac.wxwidgets.org/ticket/14826>

#14826: Eliminate build warning #809 regarding exceptions in virtual destructors of
STL base classes, with MSVC 2012/11.0 + ICC 13.0.1
--------------------------------------------------------------------------- -------------------------------+
 Reporter:  ghostvoodooman                                                                                |       Owner:        
     Type:  build error                                                                                   |      Status:  new    
 Priority:  low                                                                                           |   Milestone:        
Component:  build                                                                                         |     Version:  2.9-svn
 Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std  |   Blockedby:        
    Patch:  1                                                                                             |    Blocking:        
--------------------------------------------------------------------------- -------------------------------+
 I hope this is not a dupe.

 I have 2 warnings in program using headers from wx, and some warnings when
 building the whole wx library from the latest trunk.

 In both projects I am using ICC 13.0.1 and STL from MSVC 2012 / 11.0 . I
 am compiling wxWidgets as DLL|Debug|x64 and DLL|Release|x64 and using
 enabled C++0x mode.

 Though I guess it has nothing to do with ICC, since ICC plug-in in
 MSVC/devenv.exe IDE is using MSVC's STL.

 my custom setup.h (only relevant settings):
 wxUSE_STL defined to 0
 wxUSE_STD_CONTAINERS defined to 1
 wxUSE_STD_IOSTREAM defined to 1
 wxUSE_STD_DEFAULT defined to 1
 wxUSE_STD_STRING defined to wxUSE_STD_DEFAULT
 wxUSE_STD_STRING_CONV_IN_WXSTRING defined to wxUSE_STL

 SVN trunk r72949 .

 my program using WX library:
 {{{
 c:\PATH_TO_wxWidgets\include\wx/textctrl.h(682): warning #809: exception
 specification for virtual function "wxTextCtrlBase::~wxTextCtrlBase" is
 incompatible with that of overridden function "std::basic_streambuf<_Elem,
 _Traits>::~basic_streambuf [with _Elem=char,
 _Traits=std::char_traits<char>]"
 c:\PATH_TO_wxWidgets\include\wx/msw/textctrl.h(34): warning #809:
 exception specification for virtual function "wxTextCtrl::~wxTextCtrl" is
 incompatible with that of overridden function "std::basic_streambuf<_Elem,
 _Traits>::~basic_streambuf [with _Elem=char,
 _Traits=std::char_traits<char>]"
 }}}

 wx library itself (this is only sort'ed and uniq'ued list):
 {{{
 ..\..\include\wx/msw/textctrl.h(34): warning #809: exception specification
 for virtual function "wxTextCtrl::~wxTextCtrl" is incompatible with that
 of overridden function "std::basic_streambuf<_Elem,
 _Traits>::~basic_streambuf [with _Elem=char,
 _Traits=std::char_traits<char>]"
 ..\..\include\wx/stdstream.h(115): warning #809: exception specification
 for virtual function "wxStdOutputStream::~wxStdOutputStream" is
 incompatible with that of overridden function "std::basic_ios<_Elem,
 _Traits>::~basic_ios [with _Elem=char, _Traits=std::char_traits<char>]"
 ..\..\include\wx/stdstream.h(115): warning #809: exception specification
 for virtual function "wxStdOutputStream::~wxStdOutputStream" is
 incompatible with that of overridden function "std::basic_ostream<_Elem,
 _Traits>::~basic_ostream [with _Elem=char,
 _Traits=std::char_traits<char>]"
 ..\..\include\wx/stdstream.h(115): warning #809: exception specification
 for virtual function "wxStdOutputStream::~wxStdOutputStream" is
 incompatible with that of overridden function "std::ios_base::~ios_base"
 ..\..\include\wx/stdstream.h(31): warning #809: exception specification
 for virtual function "wxStdInputStreamBuffer::~wxStdInputStreamBuffer" is
 incompatible with that of overridden function "std::basic_streambuf<_Elem,
 _Traits>::~basic_streambuf [with _Elem=char,
 _Traits=std::char_traits<char>]"
 ..\..\include\wx/stdstream.h(74): warning #809: exception specification
 for virtual function "wxStdInputStream::~wxStdInputStream" is incompatible
 with that of overridden function "std::basic_ios<_Elem,
 _Traits>::~basic_ios [with _Elem=char, _Traits=std::char_traits<char>]"
 ..\..\include\wx/stdstream.h(74): warning #809: exception specification
 for virtual function "wxStdInputStream::~wxStdInputStream" is incompatible
 with that of overridden function "std::basic_istream<_Elem,
 _Traits>::~basic_istream [with _Elem=char,
 _Traits=std::char_traits<char>]"
 ..\..\include\wx/stdstream.h(74): warning #809: exception specification
 for virtual function "wxStdInputStream::~wxStdInputStream" is incompatible
 with that of overridden function "std::ios_base::~ios_base"
 ..\..\include\wx/stdstream.h(88): warning #809: exception specification
 for virtual function "wxStdOutputStreamBuffer::~wxStdOutputStreamBuffer"
 is incompatible with that of overridden function
 "std::basic_streambuf<_Elem, _Traits>::~basic_streambuf [with _Elem=char,
 _Traits=std::char_traits<char>]"
 ..\..\include\wx/textctrl.h(682): warning #809: exception specification
 for virtual function "wxTextCtrlBase::~wxTextCtrlBase" is incompatible
 with that of overridden function "std::basic_streambuf<_Elem,
 _Traits>::~basic_streambuf [with _Elem=char,
 _Traits=std::char_traits<char>]"
 ..\..\src\common\combocmn.cpp(943): warning #809: exception specification
 for virtual function "wxComboCtrlTextCtrl::~wxComboCtrlTextCtrl" is
 incompatible with that of overridden function "std::basic_streambuf<_Elem,
 _Traits>::~basic_streambuf [with _Elem=char,
 _Traits=std::char_traits<char>]"
 ..\..\src\generic\spinctlg.cpp(80): warning #809: exception specification
 for virtual function "wxSpinCtrlTextGeneric::~wxSpinCtrlTextGeneric" is
 incompatible with that of overridden function "std::basic_streambuf<_Elem,
 _Traits>::~basic_streambuf [with _Elem=char,
 _Traits=std::char_traits<char>]"
 }}}

 My best guess is that these WX classes are derived from STL classes (e.g.
 streams) which might throw an exception in their virtual destructor.

 Attaching patch fixing those warnings against r72949 , but I'm not sure
 about it, it might cause performance penalty (due to exceptions) in build
 without using STD/STL by custom setup.h . I guess there should be
 preprocessor guards/disablers around "throw()" in my patch for such case?

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors (was: Eliminate build warning #809 regarding exceptions in virtual destructors of STL base classes, with MSVC 2012/11.0 + ICC 13.0.1)" by wxTrac
wxTrac  
View profile  
 More options Nov 14 2012, 8:28 am
From: "wxTrac" <nore...@wxsite.net>
Date: Wed, 14 Nov 2012 13:28:40 -0000
Local: Wed, Nov 14 2012 8:28 am
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors (was: Eliminate build warning #809 regarding exceptions in virtual destructors of STL base classes, with MSVC 2012/11.0 + ICC 13.0.1)
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:1>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
--------------------------------------------------------------------------- -------------------------------+
 Reporter:  ghostvoodooman                                                                                |       Owner:          
     Type:  build error                                                                                   |      Status:  confirmed
 Priority:  low                                                                                           |   Milestone:          
Component:  build                                                                                         |     Version:  2.9-svn  
 Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std  |   Blockedby:          
    Patch:  0                                                                                             |    Blocking:          
--------------------------------------------------------------------------- -------------------------------+
Changes (by vadz):

  * status:  new => confirmed
  * patch:  1 => 0

Comment:

 `throw()` is deprecated in C++11, it doesn't seem like a good idea to
 start adding it now. And, of course, C++11 `noexcept` is not widely
 supported yet. So we probably need to define `wxNOEXCEPT` macro or
 something like this and use it instead.

 This being said, the warnings are perfectly harmless because you're never
 going to delete a `wxTextCtrl` via `streambuf` pointer anyhow so it's
 hardly high priority.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:1>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors" by wxTrac
wxTrac  
View profile  
 More options Nov 14 2012, 9:48 pm
From: "wxTrac" <nore...@wxsite.net>
Date: Thu, 15 Nov 2012 02:48:54 -0000
Local: Wed, Nov 14 2012 9:48 pm
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:2>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
--------------------------------------------------------------------------- -------------------------------+
 Reporter:  ghostvoodooman                                                                                |       Owner:                
     Type:  build error                                                                                   |      Status:  infoneeded_new
 Priority:  low                                                                                           |   Milestone:                
Component:  build                                                                                         |     Version:  2.9-svn      
 Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std  |   Blockedby:                
    Patch:  1                                                                                             |    Blocking:                
--------------------------------------------------------------------------- -------------------------------+
Changes (by ghostvoodooman):

  * status:  confirmed => infoneeded_new
  * patch:  0 => 1

Comment:

 Hello Vadim,

 Do you like this new patch?

 Or did you except `wxNOEXCEPT` not to be a "decorator", but rather
 `wxNOEXCEPT( declaration of funcion )` ?

 Attaching a path for both C++0x and C++11.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:2>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 15 2012, 12:19 am
From: "wxTrac" <nore...@wxsite.net>
Date: Thu, 15 Nov 2012 05:19:26 -0000
Local: Thurs, Nov 15 2012 12:19 am
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:3>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
--------------------------------------------------------------------------- -------------------------------+
 Reporter:  ghostvoodooman                                                                                |       Owner:        
     Type:  build error                                                                                   |      Status:  new    
 Priority:  low                                                                                           |   Milestone:        
Component:  build                                                                                         |     Version:  2.9-svn
 Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std  |   Blockedby:        
    Patch:  1                                                                                             |    Blocking:        
--------------------------------------------------------------------------- -------------------------------+
Changes (by ghostvoodooman):

  * status:  infoneeded_new => new

Comment:

 PS: and I am very sorry for my English spelling, I wrote it after I just
 woke up, and I am not native speaker... But I hope everyone is able to
 understand...

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:3>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 15 2012, 4:59 am
From: "wxTrac" <nore...@wxsite.net>
Date: Thu, 15 Nov 2012 09:59:23 -0000
Local: Thurs, Nov 15 2012 4:59 am
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:4>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
--------------------------------------------------------------------------- -------------------------------+
 Reporter:  ghostvoodooman                                                                                |       Owner:        
     Type:  build error                                                                                   |      Status:  new    
 Priority:  low                                                                                           |   Milestone:        
Component:  build                                                                                         |     Version:  2.9-svn
 Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std  |   Blockedby:        
    Patch:  1                                                                                             |    Blocking:        
--------------------------------------------------------------------------- -------------------------------+

Comment(by ghostvoodooman):

 After searching some internets, I have found that C++0x compilers require
 `throw()` but all compilers are able to understand `noexcept` not
 regarding version of C++. Should we change this decoration by preprocessor
 for some compiler that do not understands `noexcept`? Are there any?

 There is my third version of patch, which compiles fine under MSVC2012 +
 ICC 13.0.1 .

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:4>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 15 2012, 7:12 am
From: "wxTrac" <nore...@wxsite.net>
Date: Thu, 15 Nov 2012 12:12:47 -0000
Local: Thurs, Nov 15 2012 7:12 am
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:5>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
--------------------------------------------------------------------------- -------------------------------+
 Reporter:  ghostvoodooman                                                                                |       Owner:        
     Type:  build error                                                                                   |      Status:  new    
 Priority:  low                                                                                           |   Milestone:        
Component:  build                                                                                         |     Version:  2.9-svn
 Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std  |   Blockedby:        
    Patch:  1                                                                                             |    Blocking:        
--------------------------------------------------------------------------- -------------------------------+

Comment(by vadz):

 Replying to [comment:4 ghostvoodooman]:
 > After searching some internets, I have found that C++0x compilers
 require `throw()` but all compilers are able to understand `noexcept` not
 regarding version of C++.

 This can't be right. `noexcept` is new in C++11, old compilers definitely
 don't support it.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:5>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 17 2012, 4:13 am
From: "wxTrac" <nore...@wxsite.net>
Date: Sat, 17 Nov 2012 09:13:42 -0000
Local: Sat, Nov 17 2012 4:13 am
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:6>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
--------------------------------------------------------------------------- -------------------------------+
 Reporter:  ghostvoodooman                                                                                |       Owner:        
     Type:  build error                                                                                   |      Status:  new    
 Priority:  low                                                                                           |   Milestone:        
Component:  build                                                                                         |     Version:  2.9-svn
 Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std  |   Blockedby:        
    Patch:  1                                                                                             |    Blocking:        
--------------------------------------------------------------------------- -------------------------------+

Comment(by ghostvoodooman):

 I was thinking about this, the base class's destructor could throw an
 exception (in a rare situation), I think whether we should honour this
 fact by using {{{ throw(...) }}} or, for higher versions of C++ "may-
 throw" {{{ noexcept(false) }}}. If so, then macro should have a different
 name. What do you think?

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:6>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 17 2012, 6:26 am
From: "wxTrac" <nore...@wxsite.net>
Date: Sat, 17 Nov 2012 11:26:51 -0000
Local: Sat, Nov 17 2012 6:26 am
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:7>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
--------------------------------------------------------------------------- -------------------------------+
 Reporter:  ghostvoodooman                                                                                |       Owner:        
     Type:  build error                                                                                   |      Status:  new    
 Priority:  low                                                                                           |   Milestone:        
Component:  build                                                                                         |     Version:  2.9-svn
 Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std  |   Blockedby:        
    Patch:  1                                                                                             |    Blocking:        
--------------------------------------------------------------------------- -------------------------------+

Comment(by ghostvoodooman):

 Replying to [comment:6 ghostvoodooman]:
 > I was thinking about this, the base class's destructor could throw an
 exception (in a rare situation), I think whether we should honour this
 fact by using {{{ throw(...) }}} or, for higher versions of C++ "may-
 throw" {{{ noexcept(false) }}}. If so, then macro should have a different
 name. What do you think?

 Please disregard my previous post, I have just found {{{ throw(...) }}}
 produces the same warning.

 Attaching my 4th version of patch ( warning_809_patch4.patch ).

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:7>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 17 2012, 6:49 pm
From: "wxTrac" <nore...@wxsite.net>
Date: Sat, 17 Nov 2012 23:49:39 -0000
Local: Sat, Nov 17 2012 6:49 pm
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:8>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
--------------------------------------------------------------------------- -------------------------------+
 Reporter:  ghostvoodooman                                                                                |       Owner:        
     Type:  build error                                                                                   |      Status:  new    
 Priority:  low                                                                                           |   Milestone:        
Component:  build                                                                                         |     Version:  2.9-svn
 Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std  |   Blockedby:        
    Patch:  1                                                                                             |    Blocking:        
--------------------------------------------------------------------------- -------------------------------+

Comment(by vadz):

 I'm confused about the comments in your macro definitions (clearly
 `199711` corresponds to C++98, not C++0x...) but the patch itself is
 probably still correct so I'll commit it soon, thanks.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:8>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 17 2012, 6:56 pm
From: "wxTrac" <nore...@wxsite.net>
Date: Sat, 17 Nov 2012 23:56:26 -0000
Local: Sat, Nov 17 2012 6:56 pm
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:9>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
-----------------------------+--------------------------------------------- -
  Reporter:  ghostvoodooman  |       Owner:                                                                                              
      Type:  build error     |      Status:  closed                                                                                      
  Priority:  low             |   Milestone:                                                                                              
 Component:  build           |     Version:  2.9-svn                                                                                    
Resolution:  fixed           |    Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std
 Blockedby:                  |       Patch:  1                                                                                          
  Blocking:                  |  
-----------------------------+--------------------------------------------- -
Changes (by VZ):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 (In [72978]) Add wxNOEXCEPT and use it for std::streambuf-derived classes.

 This fixes warnings from Intel compiler about overriding function using a
 different exception specification than the base one and also incidentally
 provides a handy macro that can be useful in other situations.

 Closes #14826.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:9>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 19 2012, 6:53 am
From: "wxTrac" <nore...@wxsite.net>
Date: Mon, 19 Nov 2012 11:53:51 -0000
Local: Mon, Nov 19 2012 6:53 am
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:10>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
-----------------------------+--------------------------------------------- -
  Reporter:  ghostvoodooman  |       Owner:                                                                                              
      Type:  build error     |      Status:  closed                                                                                      
  Priority:  low             |   Milestone:                                                                                              
 Component:  build           |     Version:  2.9-svn                                                                                    
Resolution:  fixed           |    Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std
 Blockedby:                  |       Patch:  1                                                                                          
  Blocking:                  |  
-----------------------------+--------------------------------------------- -

Comment(by VZ):

 (In [72984]) Add wxNOEXCEPT to all wxTextCtrl dtors.

 Fix compilation with some compilers after r72978 which added wxNOEXCEPT to
 wxTextCtrlBase dtor and wxTextCtrl dtor in wxMSW but not in all the other
 ports.

 See #14826.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:10>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 19 2012, 7:28 am
From: "wxTrac" <nore...@wxsite.net>
Date: Mon, 19 Nov 2012 12:28:04 -0000
Local: Mon, Nov 19 2012 7:28 am
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:11>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
-----------------------------+--------------------------------------------- -
  Reporter:  ghostvoodooman  |       Owner:                                                                                              
      Type:  build error     |      Status:  closed                                                                                      
  Priority:  low             |   Milestone:                                                                                              
 Component:  build           |     Version:  2.9-svn                                                                                    
Resolution:  fixed           |    Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std
 Blockedby:                  |       Patch:  1                                                                                          
  Blocking:                  |  
-----------------------------+--------------------------------------------- -

Comment(by ghostvoodooman):

 Replying to [comment:10 VZ]:
 > (In [72984]) Add wxNOEXCEPT to all wxTextCtrl dtors.
 >
 > Fix compilation with some compilers after r72978 which added wxNOEXCEPT
 to
 > wxTextCtrlBase dtor and wxTextCtrl dtor in wxMSW but not in all the
 other
 > ports.
 >
 > See #14826.

 I was not sure what to do about compilation error on `wxGTK` port reported
 in wx-dev list. This (above) was one approach. There is still problem if
 one (an user) derives a new class from `wxTextCtrl[Base]`, since exception
 specification will get propagated to sub class's dtor (e.g. to implement
 custom auto-completition). So the user will be surprised about compile
 error, like that one in the list.

 Another approach (but rather ugly) would be to use the preprocessor to
 enable/disable USAGE of `wxNOEXCEPT` in all (so far) dtors we use it now,
 and (future) places as well. Like:
 {{{
 ~foo()
 #ifdef wxMSW
     wxNOEXCEPT
 #endif
 { }
 }}}

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:11>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 19 2012, 1:01 pm
From: "wxTrac" <nore...@wxsite.net>
Date: Mon, 19 Nov 2012 18:01:03 -0000
Local: Mon, Nov 19 2012 1:01 pm
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:12>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
-----------------------------+--------------------------------------------- -
  Reporter:  ghostvoodooman  |       Owner:                                                                                              
      Type:  build error     |      Status:  closed                                                                                      
  Priority:  low             |   Milestone:                                                                                              
 Component:  build           |     Version:  2.9-svn                                                                                    
Resolution:  fixed           |    Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std
 Blockedby:                  |       Patch:  1                                                                                          
  Blocking:                  |  
-----------------------------+--------------------------------------------- -

Comment(by VZ):

 (In [72989]) More compilation fixes after wxNOEXCEPT introduction.

 This is a temporary change, r72984 and the following changes (see #14826)
 will
 probably be reverted soon anyhow, but for now at least fix wxGTK
 compilation.

 Closes #14837.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:12>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 19 2012, 1:03 pm
From: "wxTrac" <nore...@wxsite.net>
Date: Mon, 19 Nov 2012 18:03:25 -0000
Local: Mon, Nov 19 2012 1:03 pm
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:13>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
-----------------------------+--------------------------------------------- -
  Reporter:  ghostvoodooman  |       Owner:                                                                                              
      Type:  build error     |      Status:  reopened                                                                                    
  Priority:  low             |   Milestone:  2.9.5                                                                                      
 Component:  build           |     Version:  2.9-svn                                                                                    
Resolution:                  |    Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std
 Blockedby:                  |       Patch:  1                                                                                          
  Blocking:                  |  
-----------------------------+--------------------------------------------- -
Changes (by vadz):

  * status:  closed => reopened
  * resolution:  fixed =>
  * milestone:  => 2.9.5

Comment:

 Replying to [comment:11 ghostvoodooman]:
 > Another approach (but rather ugly) would be to use the preprocessor to
 enable/disable USAGE of `wxNOEXCEPT` in all (so far) dtors we use it now,
 and (future) places as well. Like:
 > {{{
 > ~foo()
 > #ifdef wxMSW
 >     wxNOEXCEPT
 > #endif
 > { }
 > }}}

 I don't understand at all what does this solve, whether test for
 `__WXMSW__` or `__INTELC__`. You'd still need to use `throw()` for your
 own dtors.

 IOW I don't see any solution preserving backwards compatibility at all
 actually, not even a bad one.

 I'll think about it a bit more but if I don't find anything new I'll
 revert all these commits tomorrow.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:13>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 19 2012, 5:02 pm
From: "wxTrac" <nore...@wxsite.net>
Date: Mon, 19 Nov 2012 22:02:12 -0000
Local: Mon, Nov 19 2012 5:02 pm
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:14>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
-----------------------------+--------------------------------------------- -
  Reporter:  ghostvoodooman  |       Owner:                                                                                              
      Type:  build error     |      Status:  reopened                                                                                    
  Priority:  normal          |   Milestone:  2.9.5                                                                                      
 Component:  build           |     Version:  2.9-svn                                                                                    
Resolution:                  |    Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std
 Blockedby:                  |       Patch:  1                                                                                          
  Blocking:                  |  
-----------------------------+--------------------------------------------- -
Changes (by ghostvoodooman):

  * priority:  low => normal

Comment:

 As per our conversation in wx-dev list, I am attaching
 `warning_809_patch5.patch` patch against r72991 , which disables ICC
 13.0.1 warnings in C++0x mode about inconsistency of exception
 specification of our virtual dtors when we are deriving classes from MSVC
 2012's STL's ones.

 Also, remove our macro `wxNOEXCEPT` from these dtors (fixing compile
 errors with GCC).

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:14>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 19 2012, 7:57 pm
From: "wxTrac" <nore...@wxsite.net>
Date: Tue, 20 Nov 2012 00:57:28 -0000
Local: Mon, Nov 19 2012 7:57 pm
Subject: Re: #14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:15>

#14826: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors
-----------------------------+--------------------------------------------- -
  Reporter:  ghostvoodooman  |       Owner:                                                                                              
      Type:  build error     |      Status:  reopened                                                                                    
  Priority:  normal          |   Milestone:  2.9.5                                                                                      
 Component:  build           |     Version:  2.9-svn                                                                                    
Resolution:                  |    Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std
 Blockedby:                  |       Patch:  1                                                                                          
  Blocking:                  |  
-----------------------------+--------------------------------------------- -

Comment(by VZ):

 (In [72992]) Fix another compilation problem after wxNOEXCEPT
 introduction.

 Also add wxNOEXCEPT to wxTextCtrl dtor definition in wxMSW.

 See #14826.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:15>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "#14826: Fix ICC warnings about std::streambuf-derived classes dtors (was: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors)" by wxTrac
wxTrac  
View profile  
 More options Nov 20 2012, 7:04 am
From: "wxTrac" <nore...@wxsite.net>
Date: Tue, 20 Nov 2012 12:04:40 -0000
Local: Tues, Nov 20 2012 7:04 am
Subject: Re: #14826: Fix ICC warnings about std::streambuf-derived classes dtors (was: Add wxNOEXCEPT and use it for std::streambuf-derived classes dtors)
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:16>

#14826: Fix ICC warnings about std::streambuf-derived classes dtors
-----------------------------+--------------------------------------------- -
  Reporter:  ghostvoodooman  |       Owner:                                                                                              
      Type:  build error     |      Status:  reopened                                                                                    
  Priority:  low             |   Milestone:                                                                                              
 Component:  build           |     Version:  2.9-svn                                                                                    
Resolution:                  |    Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std
 Blockedby:                  |       Patch:  1                                                                                          
  Blocking:                  |  
-----------------------------+--------------------------------------------- -
Changes (by vadz):

  * priority:  normal => low
  * milestone:  2.9.5 =>

Comment:

 I hoped it would be enough to use the pragmas in the header... If we
 really need them in all source files deriving classes from `wxTextCtrl`,
 it's a bad solution IMO and I'm pretty sure that nobody will add this
 stuff around the next `wxTextCtrl`-derived class we add.

 So for now I'll just revert all changes and I think the best way to fix
 this would be to disable this warning globally for ICC in `wx/defs.h`.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:16>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "#14826: Fix ICC warnings about std::streambuf-derived classes dtors" by wxTrac
wxTrac  
View profile  
 More options Nov 20 2012, 7:20 am
From: "wxTrac" <nore...@wxsite.net>
Date: Tue, 20 Nov 2012 12:20:01 -0000
Local: Tues, Nov 20 2012 7:20 am
Subject: Re: #14826: Fix ICC warnings about std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:17>

#14826: Fix ICC warnings about std::streambuf-derived classes dtors
-----------------------------+--------------------------------------------- -
  Reporter:  ghostvoodooman  |       Owner:                                                                                              
      Type:  build error     |      Status:  reopened                                                                                    
  Priority:  low             |   Milestone:                                                                                              
 Component:  build           |     Version:  2.9-svn                                                                                    
Resolution:                  |    Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std
 Blockedby:                  |       Patch:  1                                                                                          
  Blocking:                  |  
-----------------------------+--------------------------------------------- -

Comment(by ghostvoodooman):

 Replying to [comment:16 vadz]:
 > I hoped it would be enough to use the pragmas in the header... If we
 really need them in all source files deriving classes from `wxTextCtrl`,
 it's a bad solution IMO and I'm pretty sure that nobody will add this
 stuff around the next `wxTextCtrl`-derived class we add.

 That would mean user will not get this warning in their own code, if they
 don't explicitly re-enable this warning after inclusion of all WX headers.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:17>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wxTrac  
View profile  
 More options Nov 20 2012, 7:49 am
From: "wxTrac" <nore...@wxsite.net>
Date: Tue, 20 Nov 2012 12:49:06 -0000
Local: Tues, Nov 20 2012 7:49 am
Subject: Re: #14826: Fix ICC warnings about std::streambuf-derived classes dtors
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:18>

#14826: Fix ICC warnings about std::streambuf-derived classes dtors
-----------------------------+--------------------------------------------- -
  Reporter:  ghostvoodooman  |       Owner:                                                                                              
      Type:  build error     |      Status:  reopened                                                                                    
  Priority:  low             |   Milestone:                                                                                              
 Component:  build           |     Version:  2.9-svn                                                                                    
Resolution:                  |    Keywords:  ICC Intel compiler visual studio 2012 virtual destructor throw exception warning 809 STL std
 Blockedby:                  |       Patch:  1                                                                                          
  Blocking:                  |  
-----------------------------+--------------------------------------------- -

Comment(by VZ):

 (In [72993]) Revert all wxNOEXCEPT-related changes.

 This reverts r72978, 72984, 72989 and 72992. Do not use wxNOEXCEPT for
 wxTextCtrl dtor as this breaks compilation of any user-defined classes
 inheriting from it unless they use wxNOEXCEPT as well and the benefits
 (fixing a harmless warning for the niche ICC compiler) are just not worth
 the compatibility breakage.

 See #14826.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14826#comment:18>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »