Document that attribute noreturn inhibits tail call optimization
PR middle-end/81035
* doc/extend.texi (Common Function Attributes): Mention that
noreturn suppresses tail call optimization.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264490 138bc75d-0d04-0410-961f-82ee72b054a4
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 667ecca..3129eae 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2018-09-21 Florian Weimer <fweimer@redhat.com>
+
+ PR middle-end/81035
+ * doc/extend.texi (Common Function Attributes): Mention that
+ noreturn suppresses tail call optimization.
+
2018-09-21 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/87309
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 4b606c0..7a69655 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -3157,6 +3157,9 @@
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.