diff --git a/src/headers/transpiler/Target.hpp b/src/headers/transpiler/Target.hpp index 877a869..5c0693d 100644 --- a/src/headers/transpiler/Target.hpp +++ b/src/headers/transpiler/Target.hpp @@ -10,6 +10,9 @@ #include #include #include +#ifdef __GNUC__ +#include +#endif #include "../parsing/ParseComponents.hpp" @@ -86,7 +89,13 @@ public: const optional& currentTask = taskMap.at(id); if (currentTask.has_value()) currentTask.value()(tree, i); } catch (const out_of_range&) { - throw Yerbacon::Exception(string(id.name()) += " is not supported by the current target"); + throw Yerbacon::Exception(string( + #ifndef __GNUC__ + id.name() + #else + abi::__cxa_demangle(id.name(), nullptr, nullptr, nullptr) + #endif + ) += " is not supported by the current target"); } } return output.str();