[Development] status of exception handling on windows and mdvc compiler

Joerg Bornemann joerg.bornemann at theqtcompany.com
Fri Aug 7 16:33:48 CEST 2015

On 07-Aug-15 15:30, Gunnar Roth wrote:

> i accidentally stumbled over this:
> https://codereview.qt-project.org/#/c/122584/
> MSVC2015: Disable warning C4577 ('noexcept' used with no exception handling mode specified).
> When compiling qt.5.5 with vs2015 i saw these many errors myself. But is
> it the real solution to disable that warning instead not using noexcept
> when exceptions are off ( using a  Q_NOEXCEPT macro)

If this warning would help catching any bugs then I'd agree. But it's 
useless for code that should build with and without exception support.

> If not using exceptions on msvc how are you  able to detect new
> failures? Is qt linking to nothrow.obj?

Qt is not linking to nothrow.obj and does not handle out of memory 

> as a side topic i found
> http://blogs.msdn.com/b/vcblog/archive/2015/08/06/new-in-vs-2015-zc-throwingnew.aspx
> and this arises the qustion how am i supposed to add my own option?
> making my own mkspec?

See https://codereview.qt-project.org/#/c/122939/
You could create a new mkspec or modify an existing one.
For your own projects you can modify QMAKE_CXXFLAGS in your .pro file.



More information about the Development mailing list