Why is the commented line below required when compiling with -Wall?
static int H()
{
while (1);
__builtin_unreachable(); // Why do I need this line?
}
int main()
{
H();
}
Without the __builtin_unreachable(), gcc 5.4.0 on linux x86 produces the following warning:
warning: no return statement in function returning non-void [-Wreturn-type]
Why does gcc not realize that the infinite loop in H() does not terminate?