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

Not able to compile with IAR ARM v8.20.2 #24

Open
microist opened this issue May 14, 2020 · 2 comments
Open

Not able to compile with IAR ARM v8.20.2 #24

microist opened this issue May 14, 2020 · 2 comments

Comments

@microist
Copy link

microist commented May 14, 2020

TinyFSM v.0.3.2 can't be compiled using IAR ARM compiler (V8.20.2):

image

The compiler seems to think that the derived state classes are unreleated to the base class. Using GCC the same code compiles and works fine without any warnings.

Adding a reinterpret_cast in line 137 allows compilation, but maybe there is a better solution/workaround for this?

current_state_ptr = reinterpret_cast<state_ptr_t>(&_state_instance<S>::value);

Thanks and best regards
Marvin

@digint
Copy link
Owner

digint commented May 24, 2020

Adding a reinterpret_cast should not break anything, I think this is fine as a workaround.

I'm hesitating a bit to add this to the code, as this should not be needed. I regard it as a compiler bug, and I've seen quite some in the past when it comes to templates.

@digint
Copy link
Owner

digint commented May 14, 2021

@ghost any news on this? do you know of any upstream (IAR ARM) fixes in that regard?

@digint digint changed the title Not able to compile with IAR ARM Not able to compile with IAR ARM v8.20.2 Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant