-
Notifications
You must be signed in to change notification settings - Fork 75
Fix #[inline(always)] for recursive functions #599
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
Comments
I have some ideas for a potential fix. The very first question to answer is: can a non recursive function hit the
This suggests there could be other causes - and that is something that needs to be checked. Assuming that the only cause of this error is recursive inlining, the soultution is realtively straightforward. SolutionsIgnore
|
I really like your solution "Attribute-based check". I believe it could work, so we could try it out and see how it goes. |
The following code:
triggers the following error:
As noted here,
always_inline
is not an optimization hint while#[inline(always)]
is a hint as noted in the reference.I'm not sure what the equivalent would be in GCC, though.
Maybe check what clang is doing (since it also has the issue) vs what
rustc
is doing.#[rustc_force_inline]
is possibly implemented viaalways_inline
.The text was updated successfully, but these errors were encountered: