I thought that calling a inline
function inside of itself wouldn't be allowed because it would lead to something like infinite source code when the function's invokations get replaced with its body(if that happends). But, when I test is that allowed, I get a Segmentation fault
. Example code:
static inline void a(void){
a();
}
int main(void){
a();
return 0;
}
I want to ask why is not a compile-error generated in the first place, and also why this leads to a Segmentation fault
. Thanks for reaching out.