https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87515

ipelupes <ipelupes at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ipelupes at hotmail dot com

--- Comment #4 from ipelupes <ipelupes at hotmail dot com> ---
I think the warning is not enough, because the resulting behaviour is quite
hard to debug, affecting the program flow, eg the following:

include <stdio.h>

int f()
{
}

int main()
{
  printf("calling returnless nonvoid\n");
  f();
  return 0;
}

compiled with g++  -O2 test.C

prints out "calling returnless nonvoid" for a few thousand times before seg
faulting on my machine (gcc 9.3.1). I would not be helped by the warning in
tracking this down in a large project (often lots of warnings are present).

also: adding __builtin_unreachable(); hides the warning making it even harder
to find

Reply via email to