This fixes several warnings of this type:
ld: warning: direct access in return_to_play_side_exception::execute()
to global weak symbol typeinfo for lua_jailbreak_exception means the
weak symbol cannot be overridden at runtime. This was likely caused by
different translation units being compiled with different visibility
settings.
This file seemed to be some sort of reimplementation of <cassert> except
with some "feature" of trying to force the debugger to hit a breakpoint.
However, any decent debugger already hits a breakpoint with a standard
assert(), and this file really only served to make it harder to see the
actual error when using a Windows console.
Some instances of these macros were replaced with assert(), others with
VALIDATE() which instead throws an exception (and possibly puts up a
dialog, if the exception is caught before main()).
A few other related changes that got mixed in:
- Several error conditions now have a better error message (or indeed
any error message at all)
- Removed an unnecessary use of std::distance on a Boost iterator range.
- Removed a large chunk of code which did nothing but construct a widget
builder and then crash; the code was unreachable since an earlier loop
did the same thing (without crashing), and the comment seems to suggest
that it was a (seemingly no longer necessary) workaround for some buggy
compilers / linkers.
- noreturn added to the list of compatibilty C++11 features in global.hpp
(Of supported compilers, only VC12 lacks the new [[attribute]] syntax.)
- Fix detection of GCC in global.hpp
# Conflicts:
# src/gui/widgets/settings.cpp
This reverts commit 60d543cf3beb2a3d07b2231778de5d33edace6fc.
Unfortunately, it seems that the address sanitizer cannot find its lib,
and I am not sure how to fix that, so I will have to revisit this at
a later time.