Displaying 1 result from an estimated 1 matches for "catchoverflow".
2019 Aug 02
2
[RFC] Stack overflow and optimizations
...ions that recurse infinitly. Also, a function that
unconditionally calls a function with a noreturn attribute can be
deduced to be noreturn.
Consider the following program:
```
#include <cstdlib>
#include <cstdio>
void overflow(); // Secret function that triggers a stack overflow
int catchoverflow() {
__try {
overflow();
printf("Exception NOT caught\n");
return 0;
} __except(true) {
printf("Exception caught\n");
return 1;
}
return 2;
}
int main() {
auto result = catchoverflow();
printf("Done execution result=%i\n", result);
re...