diff -up src/sage/graphs/base/boost_interface.cpp.orig src/sage/graphs/base/boost_interface.cpp --- src/sage/graphs/base/boost_interface.cpp.orig 2023-02-11 06:25:15.000000000 -0700 +++ src/sage/graphs/base/boost_interface.cpp 2023-03-13 11:32:02.724494081 -0600 @@ -240,7 +240,7 @@ public: try { boost::dijkstra_shortest_paths(graph, vertices[s], distance_map(boost::make_iterator_property_map(distances.begin(), index)) .predecessor_map(boost::make_iterator_property_map(predecessors.begin(), index))); - } catch (boost::exception_detail::clone_impl > e) { + } catch (boost::exception_detail::clone_impl >& e) { return to_return; } diff -up src/sage/symbolic/ginac/function.cpp.orig src/sage/symbolic/ginac/function.cpp --- src/sage/symbolic/ginac/function.cpp.orig 2023-02-11 06:25:15.000000000 -0700 +++ src/sage/symbolic/ginac/function.cpp 2023-03-13 11:32:31.540967570 -0600 @@ -961,12 +961,12 @@ ex function::evalf(int level, PyObject* try { return n.try_py_method(get_name()); } - catch (std::logic_error) { + catch (std::logic_error&) { try { const numeric& nn = ex_to(n.evalf()).try_py_method(get_name()); return nn.to_dict_parent(kwds); } - catch (std::logic_error) {} + catch (std::logic_error&) {} } } return function(serial,eseq).hold(); diff -up src/sage/symbolic/ginac/inifcns_trans.cpp.orig src/sage/symbolic/ginac/inifcns_trans.cpp --- src/sage/symbolic/ginac/inifcns_trans.cpp.orig 2023-02-11 06:25:15.000000000 -0700 +++ src/sage/symbolic/ginac/inifcns_trans.cpp 2023-03-13 11:32:57.173499217 -0600 @@ -379,7 +379,7 @@ static ex log_series(const ex &arg, // maybe substitution of rel into arg fails because of a pole try { arg_pt = arg.subs(rel, subs_options::no_pattern); - } catch (pole_error) { + } catch (pole_error&) { must_expand_arg = true; } // or we are at the branch point anyways diff -up src/sage/symbolic/ginac/mpoly-singular.cpp.orig src/sage/symbolic/ginac/mpoly-singular.cpp --- src/sage/symbolic/ginac/mpoly-singular.cpp.orig 2023-02-11 06:25:15.000000000 -0700 +++ src/sage/symbolic/ginac/mpoly-singular.cpp 2023-03-13 11:33:28.275930939 -0600 @@ -76,7 +76,7 @@ static CanonicalForm num2canonical(const try { return n.to_canonical(); } - catch (std::runtime_error) { + catch (std::runtime_error&) { if (not n.is_real()) { numeric re = n.real(); numeric im = n.imag(); @@ -233,7 +233,7 @@ const CanonicalForm ex::to_canonical(ex_ try { return ::power(var, n.to_long()); } - catch (std::runtime_error) { + catch (std::runtime_error&) { throw std::runtime_error("exponent too big"); } } @@ -261,7 +261,7 @@ const CanonicalForm ex::to_canonical(ex_ try { return ::power(var, n.to_long()); } - catch (std::runtime_error) { + catch (std::runtime_error&) { throw std::runtime_error("exponent too big"); } } diff -up src/sage/symbolic/ginac/numeric.cpp.orig src/sage/symbolic/ginac/numeric.cpp --- src/sage/symbolic/ginac/numeric.cpp.orig 2023-02-11 06:25:15.000000000 -0700 +++ src/sage/symbolic/ginac/numeric.cpp 2023-03-13 12:53:12.671709229 -0600 @@ -3636,11 +3636,11 @@ const numeric numeric::real() const { try { return try_py_method("real"); } - catch (std::logic_error) {} + catch (std::logic_error&) {} try { return try_py_method("real_part"); } - catch (std::logic_error) {} + catch (std::logic_error&) {} return *this; } default: @@ -3664,11 +3664,11 @@ const numeric numeric::imag() const { try { return try_py_method("imag"); } - catch (std::logic_error) {} + catch (std::logic_error&) {} try { return try_py_method("imag_part"); } - catch (std::logic_error) {} + catch (std::logic_error&) {} return *_num0_p; } default: @@ -4945,11 +4945,11 @@ const numeric Li2(const numeric &x, PyOb try { return x.try_py_method("dilog"); } - catch (std::logic_error) {} + catch (std::logic_error&) {} try { return x.try_py_method("polylog", *_num2_p); } - catch (std::logic_error) {} + catch (std::logic_error&) {} return x.Li2(*_num2_p, parent); } diff -up src/sage/symbolic/ginac/pseries.cpp.orig src/sage/symbolic/ginac/pseries.cpp --- src/sage/symbolic/ginac/pseries.cpp.orig 2023-02-11 06:25:15.000000000 -0700 +++ src/sage/symbolic/ginac/pseries.cpp 2023-03-13 11:34:56.953310716 -0600 @@ -855,7 +855,7 @@ ex mul::series(const relational & r, int bool flag_redo = false; try { real_ldegree = buf.expand().ldegree(sym-r.rhs()).to_int(); - } catch (std::runtime_error) {} + } catch (std::runtime_error&) {} if (real_ldegree == 0) { if ( factor < 0 ) { @@ -1053,7 +1053,7 @@ ex power::series(const relational & r, i if (is_exactly_a(basis_subs)) { must_expand_basis = true; } - } catch (pole_error) { + } catch (pole_error&) { must_expand_basis = true; } @@ -1063,7 +1063,7 @@ ex power::series(const relational & r, i if (is_exactly_a(exponent_subs)) { exponent_is_regular = false; } - } catch (pole_error) { + } catch (pole_error&) { exponent_is_regular = false; } @@ -1133,7 +1133,7 @@ ex power::series(const relational & r, i ex result; try { result = ex_to(e).power_const(numexp, order); - } catch (pole_error) { + } catch (pole_error&) { epvector ser; ser.emplace_back(Order(_ex1), order); result = pseries(r, ser); @@ -1203,7 +1203,7 @@ ex ex::series(const ex & r, int order, u order, options); } - catch(flint_error) { + catch(flint_error&) { ; } } diff -up src/sage/symbolic/ginac/sum.cpp.orig src/sage/symbolic/ginac/sum.cpp --- src/sage/symbolic/ginac/sum.cpp.orig 2023-02-11 06:25:15.000000000 -0700 +++ src/sage/symbolic/ginac/sum.cpp 2023-03-13 11:35:12.139033264 -0600 @@ -562,7 +562,7 @@ ex gosper_sum_definite(ex f, ex s, ex a, return res; return t; } - catch (gosper_domain_error) { + catch (gosper_domain_error&) { *success = 0; return _ex0; } @@ -579,7 +579,7 @@ ex gosper_sum_indefinite(ex f, ex s, int return res; return t; } - catch (gosper_domain_error) { + catch (gosper_domain_error&) { *success = 0; return _ex0; } diff -up src/sage/symbolic/ginac/upoly-ginac.cpp.orig src/sage/symbolic/ginac/upoly-ginac.cpp --- src/sage/symbolic/ginac/upoly-ginac.cpp.orig 2023-02-11 06:25:15.000000000 -0700 +++ src/sage/symbolic/ginac/upoly-ginac.cpp 2023-03-13 11:35:36.657585291 -0600 @@ -240,7 +240,7 @@ ex decomp_rational(const ex &a, const ex try { q = quo(numer, denom, x); } - catch (std::logic_error) { + catch (std::logic_error&) { return a; } return q + rem(numer, denom, x) / denom; @@ -536,7 +536,7 @@ ex parfrac(const ex & a, const ex & x) // Convert N(x)/D(x) -> Q(x) + R(x)/D(x), so degree(R) < degree(D) qr = quo_rem(numer, denom, x, true); } - catch (std::logic_error) { + catch (std::logic_error&) { return a; } // Factorize denominator and compute cofactors diff -up src/sage/symbolic/ginac/useries.cpp.orig src/sage/symbolic/ginac/useries.cpp --- src/sage/symbolic/ginac/useries.cpp.orig 2023-02-11 06:25:15.000000000 -0700 +++ src/sage/symbolic/ginac/useries.cpp 2023-03-13 11:35:59.505167856 -0600 @@ -322,10 +322,10 @@ bool useries_can_handle(const ex& the_ex (void) nd.op(1).degree(s).to_long(); (void) nd.op(1).ldegree(s).to_long(); } - catch (conversion_error) { + catch (conversion_error&) { throw std::runtime_error("exponent too big"); } - catch (std::runtime_error) {} + catch (std::runtime_error&) {} } return ok; } @@ -406,7 +406,7 @@ ex useries(const ex& the_ex, const symbo try { ldeg = low_series_degree(the_ex); } - catch (ldegree_error) { + catch (ldegree_error&) { may_extend = true; }