This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/68677] Sibcall doesn't work on function with no return
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 Dec 2015 15:25:59 +0000
- Subject: [Bug middle-end/68677] Sibcall doesn't work on function with no return
- Auto-submitted: auto-generated
- References: <bug-68677-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68677
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I believe this is intentional and has been discussed in the past.
E.g. one of the often used noreturn functions is abort and its callers, in that
case we better not sibcall to that, as it will be harder to find out where
exactly the code aborted.
Also, often not doing a sibcall is shorter, you can stay where you were with
the stack pointer, while for sibcall you'd bump the stack pointer first.