From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by sourceware.org (Postfix) with ESMTPS id 1B2E43858C2B; Sat, 31 Oct 2020 12:24:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1B2E43858C2B Received: by mail-io1-xd41.google.com with SMTP id k21so10268957ioa.9; Sat, 31 Oct 2020 05:24:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Qm1LXvI0BU0lNVVJvpZsRLiRvKPxXxghzTK4AozFUgI=; b=e9P3AX1VgnzZ8uE6elW5BXr4JwgZ43zil/rXhT2/Z/Cx47qJ5c6nvJJ4tZgXumS4Dx vstqNJ09iF/roZvxxalJsuYLNE7zcDbSx9T5T5zxw/bv4Cpgo73qgfs8b5QV6eFgGjO1 LTsTq3fL9Q6o3bhd+b4VnIoDb1RoTfGoBWWEAaH1ng/1wEUMi2oydZmmz9XKAzfObQhd xY2QDUClSCKSpiMf8q6j2UsaViH0AGvmjwBW5gjisLfOJpFtlEYPS5AFHHbczN627VuG hoXnyGKYJ8VmluVlcHkBJ3ui1MzCuGJJbpHK7++soSP/gJhlTapv7ypufM23h7+8/6Xu 8Ykw== X-Gm-Message-State: AOAM530oj4LA+uih1yeZheKNon4K9q0JDGTo7krVXtlKO6+FVeRuTugz 8liOxX7nZ8rFJSPr4+ngOmOf0bCAfMZUqTs86Zh5mRpdTWk= X-Google-Smtp-Source: ABdhPJwMkUMG40tv2aOvfO5YgV4738Wvp9pQnGk3zA39U7Zx5zRZv/KQERqkQptljQ1a79YA0Ja7kMT+3PT6NLTKNn0= X-Received: by 2002:a5e:c248:: with SMTP id w8mr5000502iop.132.1604147072343; Sat, 31 Oct 2020 05:24:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Krystian_Ku=C5=BAniarek?= Date: Sat, 31 Oct 2020 13:24:21 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: remove unused variables To: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 12:24:34 -0000 Recently merged by 86558afc09e65b172377d4e759b00094dd985e8a. Thanks! On Mon, 24 Aug 2020 at 13:26, Krystian Ku=C5=BAniarek < krystian.kuzniarek@gmail.com> wrote: > Hi, > > A description of the problem/bug and how your patch addresses it: > I've got a small patch for -Wunused-variable in system headers. These > aren't needed (i.e. no preprocessor conditions are there). > > Testcases: > N/A, it's only a warning. > > ChangeLog: > Sorry, contrib/mklog.py didn't quite work for me. > For some reason after instruction in line 129: "diff =3D PatchSet(data)" = my > "diff" variable is always empty. > > Bootstrapping and testing: > Tested that manually by recompling GCC, unfolding all headers with > `#include ` and compiling what's been included by it. > > The patch itself: > diff --git a/libstdc++-v3/include/tr1/ell_integral.tcc > b/libstdc++-v3/include/tr1/ell_integral.tcc > index 3706d8a033a..f3cf12ea2ca 100644 > --- a/libstdc++-v3/include/tr1/ell_integral.tcc > +++ b/libstdc++-v3/include/tr1/ell_integral.tcc > @@ -78,9 +78,7 @@ namespace tr1 > __ellint_rf(_Tp __x, _Tp __y, _Tp __z) > { > const _Tp __min =3D std::numeric_limits<_Tp>::min(); > - const _Tp __max =3D std::numeric_limits<_Tp>::max(); > const _Tp __lolim =3D _Tp(5) * __min; > - const _Tp __uplim =3D __max / _Tp(5); > > if (__x < _Tp(0) || __y < _Tp(0) || __z < _Tp(0)) > std::__throw_domain_error(__N("Argument less than zero " > @@ -319,10 +317,8 @@ namespace tr1 > { > const _Tp __eps =3D std::numeric_limits<_Tp>::epsilon(); > const _Tp __errtol =3D std::pow(__eps / _Tp(8), _Tp(1) / _Tp(6)); > - const _Tp __min =3D std::numeric_limits<_Tp>::min(); > const _Tp __max =3D std::numeric_limits<_Tp>::max(); > const _Tp __lolim =3D _Tp(2) / std::pow(__max, _Tp(2) / _Tp(3)); > - const _Tp __uplim =3D std::pow(_Tp(0.1L) * __errtol / __min, _Tp(2= ) / > _Tp(3)); > > if (__x < _Tp(0) || __y < _Tp(0)) > std::__throw_domain_error(__N("Argument less than zero " > @@ -498,9 +494,7 @@ namespace tr1 > __ellint_rc(_Tp __x, _Tp __y) > { > const _Tp __min =3D std::numeric_limits<_Tp>::min(); > - const _Tp __max =3D std::numeric_limits<_Tp>::max(); > const _Tp __lolim =3D _Tp(5) * __min; > - const _Tp __uplim =3D __max / _Tp(5); > > if (__x < _Tp(0) || __y < _Tp(0) || __x + __y < __lolim) > std::__throw_domain_error(__N("Argument less than zero " > @@ -569,10 +563,7 @@ namespace tr1 > __ellint_rj(_Tp __x, _Tp __y, _Tp __z, _Tp __p) > { > const _Tp __min =3D std::numeric_limits<_Tp>::min(); > - const _Tp __max =3D std::numeric_limits<_Tp>::max(); > const _Tp __lolim =3D std::pow(_Tp(5) * __min, _Tp(1)/_Tp(3)); > - const _Tp __uplim =3D _Tp(0.3L) > - * std::pow(_Tp(0.2L) * __max, _Tp(1)/_Tp(3)); > > if (__x < _Tp(0) || __y < _Tp(0) || __z < _Tp(0)) > std::__throw_domain_error(__N("Argument less than zero " > @@ -599,8 +590,7 @@ namespace tr1 > const _Tp __eps =3D std::numeric_limits<_Tp>::epsilon(); > const _Tp __errtol =3D std::pow(__eps / _Tp(8), _Tp(1) / _Tp(6= )); > > - _Tp __lambda, __mu; > - _Tp __xndev, __yndev, __zndev, __pndev; > + _Tp __mu, __xndev, __yndev, __zndev, __pndev; > > const unsigned int __max_iter =3D 100; > for (unsigned int __iter =3D 0; __iter < __max_iter; ++__iter) > > > Best regards, > Krystian >