From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 84EA63950C4D; Fri, 13 Nov 2020 21:57:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 84EA63950C4D From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/94527] RFE: Add an __attribute__ that marks a function as freeing an object Date: Fri, 13 Nov 2020 21:57:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: msebor at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2020 21:57:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94527 --- Comment #12 from Martin Sebor --- David Malcolm: I went with "overloading" attribute malloc in my patch for t= he reasons I explained my comments on your patch and in the patch submission email. I'm open to changing the name (or the association from the allocato= r to the deallocator) so long as it's limited to pointers (with integers and oth= er handles handled by some other attribute), and provided it lets users specify the position of the argument in the deallocation function's argument list. David Howells: If/when you have a chance please comment on the design and l= et us know if you have any concerns.=