From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127104 invoked by alias); 11 Sep 2016 09:39:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 127079 invoked by uid 89); 11 Sep 2016 09:39:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 11 Sep 2016 09:38:51 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 61DC383F3A; Sun, 11 Sep 2016 09:38:48 +0000 (UTC) Received: from localhost (ovpn-116-31.ams2.redhat.com [10.36.116.31]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8B9cl6E011389; Sun, 11 Sep 2016 05:38:47 -0400 Date: Sun, 11 Sep 2016 09:55:00 -0000 From: Jonathan Wakely To: Christophe Lyon Cc: Jason Merrill , "libstdc++@gcc.gnu.org" , gcc-patches List Subject: Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new Message-ID: <20160911093847.GA29332@redhat.com> References: <20160908110641.GB23306@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.7.0 (2016-08-17) X-SW-Source: 2016-09/txt/msg00599.txt.bz2 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-length: 2924 On 11/09/16 09:08 +0200, Christophe Lyon wrote: >On 10 September 2016 at 08:59, Christophe Lyon > wrote: >> On 9 September 2016 at 23:20, Jason Merrill wrote: >>> On Thu, Sep 8, 2016 at 7:06 AM, Jonathan Wakely wrote: >>>> On 08/09/16 09:10 +0200, Marc Glisse wrote: >>>>> >>>>> Do we want a generic fallback implementation (similar to >>>>> gcc/config/i386/gmm_malloc.h)? A windows version with _aligned_malloc / >>>>> _aligned_free would also be possible. >>>> >>>> Making it work for MinGW would be nice. >>> >>> OK, this is what I'm checking in; could someone test it on MinGW? >>> >>> Jason >> >> Hi Jason, >> >> I'm seeing problems on arm*linux: the tests aligned-new[1235].C fail to link: >> aligned-new5.C:(.text+0x14): undefined reference to `operator >> new(unsigned int, std::align_val_t)' >> >> >> On aarch64*-elf and arm-eabi (using newlib), I'm seeing: >> /gccsrc/libstdc++-v3/libsupc++/new_opa.cc:66: undefined reference to >> `aligned_alloc' >> >> Am I missing something in my setup? >> > >I'm seeing an additional problem: to GCC build is broken after this >commit for target arm-none-eabi (using default cpu): >/home/christophe.lyon/src/GCC/sources/gcc-fsf/reg-240062/libstdc++-v3/libsupc++/new_opant.cc: >In function 'void* operator new(std::size_t, std::align_val_t, const >std::nothrow_t&)': >/home/christophe.lyon/src/GCC/sources/gcc-fsf/reg-240062/libstdc++-v3/libsupc++/new_opant.cc:33:3: >error: '__try' was not declared in this scope > __try > ^~~~~ >/home/christophe.lyon/src/GCC/sources/gcc-fsf/reg-240062/libstdc++-v3/libsupc++/new_opant.cc:37:11: >error: expected primary-expression before '...' token > __catch(...) > ^~~ >/home/christophe.lyon/src/GCC/sources/gcc-fsf/reg-240062/libstdc++-v3/libsupc++/new_opant.cc:37:3: >error: '__catch' was not declared in this scope > __catch(...) > ^~~~~~~ >/home/christophe.lyon/src/GCC/sources/gcc-fsf/reg-240062/libstdc++-v3/libsupc++/new_opant.cc:41:1: >warning: no return statement in function returning non-void >[-Wreturn-type] > } > ^ >/home/christophe.lyon/src/GCC/sources/gcc-fsf/reg-240062/libstdc++-v3/libsupc++/new_opant.cc:30:26: >warning: unused parameter 'sz' [-Wunused-parameter] > operator new(std::size_t sz, std::align_val_t al, const std::nothrow_t&) > ^~ >/home/christophe.lyon/src/GCC/sources/gcc-fsf/reg-240062/libstdc++-v3/libsupc++/new_opant.cc:30:47: >warning: unused parameter 'al' [-Wunused-parameter] > operator new(std::size_t sz, std::align_val_t al, const std::nothrow_t&) > ^~ >make[4]: *** [new_opant.lo] Error 1 >make[4]: Leaving directory >`/home/christophe.lyon/src/GCC/builds/gcc-fsf-reg-240062/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/libsupc++' Hmm, I'm not sure why it's not failing on all targets, but this should fix it. Could you test it? --envbJBWh7q8WU6mo Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" Content-length: 256 --- a/libstdc++-v3/libsupc++/new_opant.cc +++ b/libstdc++-v3/libsupc++/new_opant.cc @@ -24,6 +24,7 @@ // . #include +#include #include "new" _GLIBCXX_WEAK_DEFINITION void* --envbJBWh7q8WU6mo--