Re: Where to place warning about non-optimized tail and sibling calls

2023-08-02 Thread Bradley Lucier via Gcc
On 8/1/23 6:08 PM, David Malcolm wrote: FWIW I added it to support Scheme from libgccjit; Do you know of any Scheme using libgccjit? BTW, I tried to build mainline with --enable-coverage to see which code is executed with -foptimize-sibling-calls, but bootstrap fails with /home/lucier/progr

Re: Where to place warning about non-optimized tail and sibling calls

2023-08-01 Thread Bradley Lucier via Gcc
On 8/1/23 6:08 PM, David Malcolm wrote: Or from libgccjit. FWIW I added it to support Scheme from libgccjit; see this patch kit: https://gcc.gnu.org/ml/gcc-patches/2016-05/msg01287.html Perhaps there's a case for a frontend attribute for this. Dave Thanks. I thought a front-end warning mi

Re: Where to place warning about non-optimized tail and sibling calls

2023-08-01 Thread Bradley Lucier via Gcc
On 8/1/23 12:51 PM, Paul Koning wrote: How is it possible to write valid C that is correct only if some optimization is done? Perhaps "incorrect" was the wrong word. If sibling-call optimization is not done, then perhaps the program will blow out the stack, which would not happen if the opt

Where to place warning about non-optimized tail and sibling calls

2023-08-01 Thread Bradley Lucier via Gcc
The Gambit Scheme->C compiler has an option to generate more efficient code if it knows that all tail and sibling calls in the generated C code will be optimized. If gcc does not, however, optimize a tail or sibling call, the generated C code may be incorrect (depending on circumstances). So