From patchwork Fri Oct 21 11:36:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 685049 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t0kDd0LKbz9srZ for ; Fri, 21 Oct 2016 22:37:20 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=RwT3y3ig; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=mqnwMFo1iZt6OJ7b9 xivPMmoLzEUrO4/Xx4gnCi+w1YzQe0V46mMJv8lnaQZplh4J6WUB3XwvLSWgj4Nz tz37OL8YCIjwVPNJbPz2V7q7rNy9qn8n2g4FXXA7ED/H5t2yCW98tigObPROZFVK gaXy3oNpnRFlMX0BzMl8BiZdoE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=/qkLBZBNPJLgyKCIWyefogY tbS4=; b=RwT3y3igzMGdWNPCCV87/9o3+syBGsAVbRbjb+dTi+xMtuEpuq7Y4er vIGG8HCNknne3cGicsM8M0Nn3q3cpn4Ba7LfwgvO+lW+ouCKlb5zUnBlKoUuIffe T3DWV8jD4mY5Hn1i/Q1joC31zXolbOpd3Yp6DVqNgiv5NVEuXbu8= Received: (qmail 116202 invoked by alias); 21 Oct 2016 11:37:09 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 116171 invoked by uid 89); 21 Oct 2016 11:37:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=burn, Ryan, ryan, Burn X-HELO: mail-qt0-f173.google.com Received: from mail-qt0-f173.google.com (HELO mail-qt0-f173.google.com) (209.85.216.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Oct 2016 11:36:58 +0000 Received: by mail-qt0-f173.google.com with SMTP id m5so81700143qtb.3 for ; Fri, 21 Oct 2016 04:36:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xL8eKUTprL6ZcecZP7NhmmNpRqytO4fYeIO3NVyg05I=; b=kbLG6P77uNnwMvE8TtRrRWJ58eSkzqiJBszxTeF6lkp5HdxC0m1xoe+IEJmJ1U//dJ FNrxLUYo1YznD03gr0nUE0dDal7H3GDDmA2d93lv4Z5ErQO+THjjsHxPSPJuOedkB6dR Fg9w/Q27Wh9uEH6r4p4Ms5Rph+jjo2SpyVULNMlicAQ5Q2ugS8p2fdBJCWJJue/saSl+ Y+/5BCcKNhey62tY83mQrCp2TuZQZlnhOoYw0y2Q0VEFKoL0HN9RVtzMwc+5AeFtdE4d WdVx0mBSCB0FXRMm9rP7gzu6OPX1MB/MEUffth/oaVTb++L5Jk1XS2eRzGc+zMBw9eI4 WXew== X-Gm-Message-State: AA6/9RkzillI9bBkj8ZrVvXLhPgzw/IxCKlYjFzOi+bQMwm/98Q2GhinwtuEKbzMDiNsJ876 X-Received: by 10.28.148.22 with SMTP id w22mr6053166wmd.42.1477049816496; Fri, 21 Oct 2016 04:36:56 -0700 (PDT) Received: from odyssey.scylladb.com ([37.142.229.250]) by smtp.gmail.com with ESMTPSA id ma5sm2393077wjb.47.2016.10.21.04.36.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Oct 2016 04:36:55 -0700 (PDT) Received: by odyssey.scylladb.com (Postfix, from userid 1042) id 0D96414083F; Fri, 21 Oct 2016 14:36:54 +0300 (IDT) Date: Fri, 21 Oct 2016 14:36:54 +0300 From: Gleb Natapov To: Ryan Burn Cc: Jonathan Wakely , gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: [PATCHv2] do not throw in std::make_exception_ptr Message-ID: <20161021113653.GA26234@scylladb.com> References: <20160805044923.GX17903@scylladb.com> <20160821122030.GC9243@scylladb.com> <20160822172935.GV20016@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: On Thu, Oct 20, 2016 at 11:53:49PM -0400, Ryan Burn wrote: > Are exception classes required to support emplace new construction > like that? With this change, Intel's TBB library no longer compiles > because its exception class declares it's own new operator (see > https://github.com/wjakob/tbb/blob/master/include/tbb/tbb_exception.h): > Can you test this patch please: > > class tbb_exception : public std::exception > { > /** No operator new is provided because the TBB usage model assumes dynamic > creation of the TBB exception objects only by means of applying move() > operation on an exception thrown out of TBB scheduler. **/ > void* operator new ( size_t ); > .... > > > On Mon, Aug 22, 2016 at 1:29 PM, Jonathan Wakely wrote: > > On 21/08/16 15:20 +0300, Gleb Natapov wrote: > >> > >> Jonathan, > >> > >> Is this version OK with you? > > > > > > I've committed the attached version, which just adds some whitespace > > and fixes the testsuite_abi.cc test. > > > > Thanks very much for the improvement to the code. > > --- Gleb. diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h index 21e4e8b..6ade626 100644 --- a/libstdc++-v3/libsupc++/exception_ptr.h +++ b/libstdc++-v3/libsupc++/exception_ptr.h @@ -190,7 +190,7 @@ namespace std (void)__cxxabiv1::__cxa_init_primary_exception(__e, const_cast(&typeid(__ex)), __exception_ptr::__dest_thunk<_Ex>); - new (__e) _Ex(__ex); + ::new (__e) _Ex(__ex); return exception_ptr(__e); #else throw __ex;