2018-09-21 Florian Weimer <fwei...@redhat.com> PR middle-end/81035 * doc/extend.texi (Common Function Attributes): Mention that noreturn suppresses tail call optimization.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index e3312aa8b42..909e7a17357 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -3157,6 +3157,9 @@ The @code{noreturn} keyword does not affect the exceptional path when that applies: a @code{noreturn}-marked function may still return to the caller by throwing an exception or calling @code{longjmp}. +In order to preserve backtraces, GCC will never turn calls to +@code{noreturn} functions into tail calls. + Do not assume that registers saved by the calling function are restored before calling the @code{noreturn} function.