work around gcc 8.2.1+ bug #89303

Do not call std::make_shared on classes inheriting from
std::enable_shared_from_this when compiling with g++ 8.2.

* NEWS: Mention the bug.
* spot/misc/common.hh (SPOT_make_shared_enabled__): New macro.
* spot/twa/twagraph.cc, spot/twa/twagraph.hh, spot/twa/twaproduct.hh,
spot/twa/taatgba.hh, spot/twaalgos/couvreurnew.cc,
spot/twaalgos/magic.cc, spot/twaalgos/se05.cc, spot/twaalgos/tau03.cc,
spot/twaalgos/tau03opt.cc, spot/twaalgos/gv04.cc,
spot/ltsmin/ltsmin.cc, spot/twaalgos/gtec/gtec.cc: Use it.
This commit is contained in:
Alexandre Duret-Lutz 2019-02-12 17:58:38 +01:00
parent d0b9806500
commit a86925e20e
14 changed files with 105 additions and 58 deletions

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2011, 2012, 2014-2018 Laboratoire de
// Copyright (C) 2011, 2012, 2014-2019 Laboratoire de
// Recherche et Développement de l'Epita (LRDE)
//
// This file is part of Spot, a model checking library.
@ -1106,7 +1106,8 @@ namespace spot
dict->unregister_all_my_variables(iface.get());
throw;
}
auto res = std::make_shared<spins_kripke>(iface, dict, ps, dead, compress);
auto res = SPOT_make_shared_enabled__(spins_kripke,
iface, dict, ps, dead, compress);
// All atomic propositions have been registered to the bdd_dict
// for iface, but we also need to add them to the automaton so
// twa::ap() works.