1
What happens to the program if I declare an infinite recursive function inline?
1
What happens to the program if I declare an infinite recursive function inline?
1
In theory or practice? In theory it could break the compiler, but every worthy compiler will do the inline limited form. It doesn’t pay to do more than 4 optimizations (this is implementation detail), after that it is better to make the call without the inline. In fact, it’s possible that you might consider doing nothing at all.
Browser other questions tagged c c++ recursion inline
You are not signed in. Login or sign up in order to post.
One infinite recursion results in undefined behavior, so it doesn’t matter much.
– Mário Feroldi