>>29260078You are correct
From
MISRA-C:2004 – Guidelines for the use of the C language in critical systems. Motor Industry Research
Association (MIRA) Limited, Nuneaton, UK, 2004.
Rule 16.2 (Required)
Functions shall not call themselves, either directly or indirectly.
This means that recursive function calls cannot be used in safety-related systems. Recursion
carries with it in the danger of exceeding available stack space, which can be a serious error.
Unless recursion is very tightly controlled, it is not possible to determine before execution
what the worst-case stack usage could be.