From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103547 invoked by alias); 24 Nov 2015 12:06:04 -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 103501 invoked by uid 89); 24 Nov 2015 12:06:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_40,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 24 Nov 2015 12:06:02 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 3E58EC001256; Tue, 24 Nov 2015 12:06:01 +0000 (UTC) Received: from localhost (ovpn-116-120.ams2.redhat.com [10.36.116.120]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAOC60lw013028; Tue, 24 Nov 2015 07:06:00 -0500 Date: Tue, 24 Nov 2015 12:07:00 -0000 From: Jonathan Wakely To: Rainer Orth Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: [v3] Handle C++11 overloads on Solaris 12 Message-ID: <20151124120559.GI11200@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2015-11/txt/msg02880.txt.bz2 On 17/11/15 13:33 +0100, Rainer Orth wrote: >Solaris 12 recently introduced the C++11 overloads, which >caused bootstrap to be broken on both mainline and the gcc-5 branch: > >In file included from /vol/gcc/src/hg/trunk/local/libstdc++-v3/include/precompiled/stdc++.h:41:0: >/var/gcc/regression/trunk/12-gcc/build/i386-pc-solaris2.12/libstdc++-v3/include/cmath: In function 'constexpr int std::fpclassify(float)': >/var/gcc/regression/trunk/12-gcc/build/i386-pc-solaris2.12/libstdc++-v3/include/cmath:561:3: error: redefinition of 'constexpr int std::fpclassify(float)' > fpclassify(float __x) > ^ >In file included from /usr/include/math.h:13:0, > from /var/gcc/regression/trunk/12-gcc/build/i386-pc-solaris2.12/libstdc++-v3/include/cmath:44, > from /vol/gcc/src/hg/trunk/local/libstdc++-v3/include/precompiled/stdc++.h:41: >/usr/include/iso/math_c99.h:647:13: note: 'int std::fpclassify(float)' previously defined here > inline int fpclassify(float __X) { return __builtin_fpclassify( > ^ > >The following patch fixes this by testing for the problem and wrapping >the overloads in include/c_global/cmath and include/tr1/cmath >appropriately. The test needs to be dynamic since apparently a backport >to Solaris 11 (and perhaps even Solaris 10) is planned. Why does need to change, did Solaris also define the functions in namespace std::tr1?