diff options
author | Florian Weimer <fweimer@redhat.com> | 2018-09-21 21:49:36 +0200 |
---|---|---|
committer | Florian Weimer <fw@gcc.gnu.org> | 2018-09-21 21:49:36 +0200 |
commit | 2e3f6531bfb5a880d88ec592de944a329aaef18a (patch) | |
tree | 6148d0d5db48b25b2e5a70ebba067ba635a6d0e1 | |
parent | 382955736eca482bfebe5eecdc2eb6ac5f9f0d72 (diff) | |
download | gcc-2e3f6531bfb5a880d88ec592de944a329aaef18a.zip gcc-2e3f6531bfb5a880d88ec592de944a329aaef18a.tar.gz gcc-2e3f6531bfb5a880d88ec592de944a329aaef18a.tar.bz2 |
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.
From-SVN: r264490
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/doc/extend.texi | 3 |
2 files changed, 9 insertions, 0 deletions
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 @@ 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. |