Closed matgla closed 1 month ago
Hi, I just wanted to raise issue that fix is necessary for -fno-rtti + -fno-exception builds. Usage of __PRETTY_FUNCTION and MSVC FUNCSIG__ is a little bit hacky I think, so maybe it's better to print just exception without type.
arm-none-eabi-g++ also fails on std::string to const char* conversion.
Gotbolt link with example usage compile time type_name : https://godbolt.org/z/75fnc5Krq
Real use example: 09:47:22.2417 [INFO] uart0: [host: 81.23ms (+1.83ms)|virt: 0.2ms (+0.2ms)] Type safety violation: Throw exception (-fno-exception) with type "std::error_condition&&" and the message "'fopen' attempt failed"
Thanks! That's quite cute.
It looks like this may be your first contribution to cppfront. I've sent the Contributor License Agreement (CLA) to your email, and once it's signed I can look in more detail at your pull request. Thanks again for your contribution.
Looks, good, thanks!
Typeid cannot be used when -fno-rtti is used. Fixed compilation of generated sources on arm-none-eabi-g++ 13.1.