Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for arm-none-eabi-g++ #1045

Merged
merged 3 commits into from
May 11, 2024
Merged

Fixes for arm-none-eabi-g++ #1045

merged 3 commits into from
May 11, 2024

Conversation

matgla
Copy link
Contributor

@matgla matgla commented Mar 29, 2024

Typeid cannot be used when -fno-rtti is used.
Fixed compilation of generated sources on arm-none-eabi-g++ 13.1.

Fixed compilation of generated sources on arm-none-eabi-g++ 13.1.
@matgla
Copy link
Contributor Author

matgla commented Mar 29, 2024

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"

@hsutter
Copy link
Owner

hsutter commented May 8, 2024

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.

@hsutter
Copy link
Owner

hsutter commented May 11, 2024

Looks, good, thanks!

@hsutter hsutter merged commit bfc1f45 into hsutter:main May 11, 2024
11 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants