Hi! On Thu, Aug 20, 2026 at 09:27:13AM +1000, Yongqiang Tian wrote: > Commit 9752f802b3869c96446f7e84e43d89360695c0f8 introduced > eliminate_tail_calls to turn the final call of a function into a jump. > Commit 431b6b1cd92a54f4a53b66a5ff27a64381ff9a23 then applied it to > complain() and complain_with_dbg() so that these wrappers would not appear > in diagnostic backtraces. > > The GCC expansion enables sibling-call optimization. The Clang expansion > currently uses disable_tail_calls, which has the opposite meaning: Clang > documents it as preventing tail-call optimization inside the attributed > function.
Interesting, because I remember that when I found this attribute, it was mentioned what you said, but it didn't be have as described for me and I concluded that the explanation was either unclear or just mistaken. the fact that you also had to pass noinline to the callee might explain why I observed a different behavior: since the compiler is usually free to inline what it wants, it's possible that the differences I observed were in fact due to its decision to inline the callee or not. I will retest with your change on different machines and merge it if it looks OK. Many thanks for testing and reporting this! Willy

