diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 667ecca4ed0..3129eae5c2b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-09-21 Florian Weimer + + PR middle-end/81035 + * doc/extend.texi (Common Function Attributes): Mention that + noreturn suppresses tail call optimization. + 2018-09-21 David Malcolm PR tree-optimization/87309 diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 4b606c007d8..7a696556c35 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.