From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6236 invoked by alias); 23 Dec 2010 16:19:35 -0000 Received: (qmail 6226 invoked by uid 22791); 23 Dec 2010 16:19:33 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Dec 2010 16:19:29 +0000 From: "aldyh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/46941] [trans-mem] new/delete operator are unsafe X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aldyh at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 23 Dec 2010 16:19:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-12/txt/msg02567.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46941 --- Comment #4 from Aldy Hernandez 2010-12-23 16:19:12 UTC --- Patrick. You will find out that when hacking on GCC, everything is intrusive in non-obvious ways :). What I had in mind was something simple like this, since push_cp_library_fn() only gets called when creating delete/new operators. Index: cp/decl.c =================================================================== --- cp/decl.c (revision 168123) +++ cp/decl.c (working copy) @@ -3775,6 +3775,8 @@ push_cp_library_fn (enum tree_code opera operator_code, type); pushdecl (fn); + if (flag_tm) + apply_tm_attr (fn, get_identifier ("transaction_pure")); return fn; } However, this is exhibiting an unrelated bug with inlining that I am investigating. Thanks for all your bugreports! They've made my life easier.