diff --git a/bootstrap.py b/bootstrap.py index f26232ab..c2f4ebe3 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -55,7 +55,7 @@ args = parser.parse_args() # general variables include = [ '.', './include' ] depends = [os.path.join('Catch', 'include')] -cxxflags = [ '-Wall', '-Wextra', '-pedantic', '-pedantic-errors', '-std=c++14', '-ftemplate-depth=1024' ] +cxxflags = [ '-Wall', '-Wextra', '-Wpedantic', '-pedantic', '-pedantic-errors', '-std=c++14', '-ftemplate-depth=1024' ] cxxflags.extend([p for p in re.split("( |\\\".*?\\\"|'.*?')", args.cxx_flags) if p.strip()]) ldflags = [] script_dir = os.path.dirname(os.path.realpath(sys.argv[0])) diff --git a/sol/protected_function.hpp b/sol/protected_function.hpp index ed2861e7..009f7910 100644 --- a/sol/protected_function.hpp +++ b/sol/protected_function.hpp @@ -83,7 +83,6 @@ private: } protected_function_result invoke(types<>, std::index_sequence<>, std::ptrdiff_t n, handler& h) const { - bool handlerpushed = error_handler.valid(); int stacksize = lua_gettop(lua_state()); int firstreturn = std::max(1, stacksize - static_cast(n) - 1); int returncount = 0; diff --git a/sol/stack_check.hpp b/sol/stack_check.hpp index 8be8885a..9462f9d7 100644 --- a/sol/stack_check.hpp +++ b/sol/stack_check.hpp @@ -290,7 +290,7 @@ template struct checker, type::poly, C> { template static bool check(lua_State* L, int index, Handler&& handler) { - return stack::check(L, index, std::forward(handler)); + return stack::check(L, index, no_panic) || stack::check(L, index, std::forward(handler)); } }; } // stack