Re: Safe Cascading Frees

2024-07-16 Thread Jonathan Wakely via Gcc
On Tue, 16 Jul 2024 at 19:26, M.C.A. (Marco) Devillers wrote: > > All your proposals now boil down to: Do explicit memory management > whereas the developer supposes that is handled for them. There's no explicit memory management in the loop I showed. It's explicit control of lifetime, which is w

Re: Safe Cascading Frees

2024-07-16 Thread M.C.A. (Marco) Devillers via Gcc
All your proposals now boil down to: Do explicit memory management whereas the developer supposes that is handled for them. On Tue, Jul 16, 2024 at 8:24 PM Jonathan Wakely wrote: > > On Tue, 16 Jul 2024 at 19:12, Jonathan Wakely wrote: > > > > > > > > On Tue, 16 Jul 2024, 18:51 M.C.A. (Marco) De

Re: Safe Cascading Frees

2024-07-16 Thread Jonathan Wakely via Gcc
On Tue, 16 Jul 2024 at 19:12, Jonathan Wakely wrote: > > > > On Tue, 16 Jul 2024, 18:51 M.C.A. (Marco) Devillers via Gcc, > wrote: >> >> Document number: SCF4C++00 >> Date: 2024-7-16 >> Audience: GCC email list >> Reply-to: marco.devill...@gmail.com, gcc@gcc.gnu.org >> >> I. Introduction >>

Re: Safe Cascading Frees

2024-07-16 Thread Jonathan Wakely via Gcc
On Tue, 16 Jul 2024, 18:51 M.C.A. (Marco) Devillers via Gcc, < gcc@gcc.gnu.org> wrote: > Document number: SCF4C++00 > Date: 2024-7-16 > Audience: GCC email list > Reply-to: marco.devill...@gmail.com, gcc@gcc.gnu.org > > I. Introduction > > Because C++ smart pointers are based on RAII it is eas

Safe Cascading Frees

2024-07-16 Thread M.C.A. (Marco) Devillers via Gcc
Document number: SCF4C++00 Date: 2024-7-16 Audience: GCC email list Reply-to: marco.devill...@gmail.com, gcc@gcc.gnu.org I. Introduction Because C++ smart pointers are based on RAII it is easy to trigger an overflow of the C stack since destructors call each other. Smart pointers are supposed

Re: Insn combine trying (ior:HI (clobber:HI (const_int 0)))

2024-07-16 Thread Jeff Law via Gcc
On 7/16/24 4:29 AM, Georg-Johann Lay wrote: Am 15.07.24 um 19:53 schrieb Richard Sandiford: Georg-Johann Lay writes: In a test case I see insn combine trying to match such expressions, which do not make any sense to me, like: Trying 2 -> 7:   2: r45:HI=r48:HI     REG_DEAD r48:HI

Re: How to implement Native TLS for a specific platform?

2024-07-16 Thread Claudiu Zissulescu Ianculescu via Gcc
Hi Julian, You can check how we did it for ARC. In a nutshell, you need to define HAVS_AS_TLS macro, you need to legitimize the new TLS address and calls. Please have a look in arc.cc and search for TLS, also use git blame to see the original patches. Of course, there are different ways to impleme

Re: insn attributes: Support blocks of C-code?

2024-07-16 Thread Georg-Johann Lay
Am 13.07.24 um 13:44 schrieb Richard Sandiford: Georg-Johann Lay writes: So I had that situation where in an insn attribute, providing a block of code (rather than just an expression) would be useful. Expressions can provided by means of symbol_ref, like in (set (attr "length") (symbol_r

Re: Insn combine trying (ior:HI (clobber:HI (const_int 0)))

2024-07-16 Thread Georg-Johann Lay
Am 15.07.24 um 19:53 schrieb Richard Sandiford: Georg-Johann Lay writes: In a test case I see insn combine trying to match such expressions, which do not make any sense to me, like: Trying 2 -> 7: 2: r45:HI=r48:HI REG_DEAD r48:HI 7: {r47:HI=r45:HI|r46:PSI#0;clobber scrat

[RFC] genoutput: Error on unresolved iterator

2024-07-16 Thread Stefan Schulze Frielinghaus via Gcc
I just ran into an unresolved iterator https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657360.html which motivated me to dig into genoutput.cc where in process_template() we already emit an error but only if the new compact syntax is used. There is probably a reason for limiting the check to th