From patchwork Thu May 16 13:41:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 244326 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id A99792C015E for ; Thu, 16 May 2013 23:41:49 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=mKTsQ3SkROnlnHfs1xmK6d3UqkzPj/rAdKwl5oXGp9ScDJCOA4 fRntLRhNExeI2BboowYKZejUGW8k3ECcCehKIP/uxeqzdBarestfLFEoPrftP1DV HW8+6jYz3B0T0mfZSEvPd7IFbh20ToGXVhKxLPal4rLoJqgzAqR5iupI8= 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:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=FpJbL/3lx7eYbYpOEcH/d9l0Yig=; b=hIwrn9pf9brOnwUvgyPS 2QnE3jXwBVZX6hjT+HUuYOF08x1BAvhCXTDQzx17b6QVGtTYKW8IN7aWuYvkPu7a OygUMX/LypLdF45QKGnnx2Mf/2q/YQ8pCyqbJatpPZ6+jS2CR/wmbOxuDSf9bTis mGVHvlTgb02j6BjwAapBzJU= Received: (qmail 2320 invoked by alias); 16 May 2013 13:41:43 -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 2306 invoked by uid 89); 16 May 2013 13:41:43 -0000 X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 16 May 2013 13:41:42 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id D1D92FC8; Thu, 16 May 2013 15:41:39 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id e4TFLaP8h6Uv; Thu, 16 May 2013 15:41:37 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id D211AFC6; Thu, 16 May 2013 15:41:37 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id r4GDfb5m006060; Thu, 16 May 2013 15:41:37 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Bruce Korb , libstdc++@gcc.gnu.org Subject: [fixincludes] solaris_pow_int_overload should use __cplusplus Date: Thu, 16 May 2013 15:41:37 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (usg-unix-v) MIME-Version: 1.0 X-Virus-Found: No Work is going on to incorporate all applicable fixincludes fixes into the Solaris headers proper. One fix is currently problematic since it uses an G++-internal macro (__GXX_EXPERIMENTAL_CXX0X__) where libstdc++ already switched to testing __cplusplus. The following patch updates the fix to match . Tested by mainline bootstraps on i386-pc-solaris2.11, sparc-sun-solaris2.11 and 4.8 bootstrap on i386-pc-solaris2.10. Ok for mainline and 4.8 branch if they pass? Thanks. Rainer 2013-05-15 Rainer Orth * inclhack.def (solaris_pow_int_overload): Update comment. Change guard to match . * fixincl.x: Regenerate. * tests/base/iso/math_iso.h [SOLARIS_POW_INT_OVERLOAD_CHECK]: Matching change. # HG changeset patch # Parent c4272fed2b181caf1d8a82b6c0c727d0371c4f18 solaris_pow_int_overload should use __cplusplus diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -3474,7 +3474,7 @@ fix = { /* - * The pow overloads with int were removed in C++ 2011. + * The pow overloads with int were removed in C++ 2011 DR 550. */ fix = { hackname = solaris_pow_int_overload; @@ -3483,7 +3483,7 @@ fix = { select = "^[ \t]*inline [a-z ]* pow\\([^()]*, int [^()]*\\)" " *\\{[^{}]*\n[^{}]*\\}"; c_fix = format; - c_fix_arg = "#ifndef __GXX_EXPERIMENTAL_CXX0X__\n%0\n#endif"; + c_fix_arg = "#if __cplusplus < 201103L\n%0\n#endif"; test_text = " inline long double pow(long double __X, int __Y) { return\n" diff --git a/fixincludes/tests/base/iso/math_iso.h b/fixincludes/tests/base/iso/math_iso.h --- a/fixincludes/tests/base/iso/math_iso.h +++ b/fixincludes/tests/base/iso/math_iso.h @@ -10,7 +10,7 @@ #if defined( SOLARIS_POW_INT_OVERLOAD_CHECK ) -#ifndef __GXX_EXPERIMENTAL_CXX0X__ +#if __cplusplus < 201103L inline long double pow(long double __X, int __Y) { return __powl(__X, (long double) (__Y)); } #endif