- Has "stack overflow" specified behavior? - 3 Updates
| wij <wyniijj@gmail.com>: Dec 12 12:42AM -0800 void t() { int a; ++a; t(); }; int main() { t(); } --- Has "stack overflow" specified behavior? |
| Bonita Montero <Bonita.Montero@gmail.com>: Dec 12 09:52AM +0100 Am 12.12.2021 um 09:42 schrieb wij: > } > --- > Has "stack overflow" specified behavior? If you're lucky a stack overflow even won't happen because the com- piler will detect the tail-recursion and convert it into an iteration. |
| red floyd <no.spam.here@its.invalid>: Dec 12 12:59PM -0800 On 12/12/2021 12:52 AM, Bonita Montero wrote: >> Has "stack overflow" specified behavior? > If you're lucky a stack overflow even won't happen because the com- > piler will detect the tail-recursion and convert it into an iteration. Not to mention the potential UB with the use-before-initialization of the ++a; statement. |
| You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment