From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 551D63858D39; Fri, 4 Mar 2022 11:27:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 551D63858D39 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-7474] libstdc++: Fix -Wunused-local-typedefs warning in X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 49bc9c6c1ef9441c3db586882e1985da3be9cfa1 X-Git-Newrev: 289f65d643e18210433e0f08ccaaf5b08b3d6f39 Message-Id: <20220304112752.551D63858D39@sourceware.org> Date: Fri, 4 Mar 2022 11:27:52 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2022 11:27:52 -0000 https://gcc.gnu.org/g:289f65d643e18210433e0f08ccaaf5b08b3d6f39 commit r12-7474-g289f65d643e18210433e0f08ccaaf5b08b3d6f39 Author: Jonathan Wakely Date: Fri Mar 4 10:43:29 2022 +0000 libstdc++: Fix -Wunused-local-typedefs warning in libstdc++-v3/ChangeLog: * libsupc++/compare (strong_order::_S_fp_cmp): Move typedef inside #if condition. Diff: --- libstdc++-v3/libsupc++/compare | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/libsupc++/compare b/libstdc++-v3/libsupc++/compare index a8747207b23..050cf7ed20d 100644 --- a/libstdc++-v3/libsupc++/compare +++ b/libstdc++-v3/libsupc++/compare @@ -850,8 +850,6 @@ namespace std return strong_ordering::equal; // All bits are equal, we're done. using enum _Fp_fmt; - using _Int = decltype(__ix); - constexpr auto __fmt = _S_fp_fmt<_Tp>(); if constexpr (__fmt == _Dbldbl) // double-double @@ -899,6 +897,8 @@ namespace std // bit to be reversed. Flip that to give desired ordering. if (__builtin_isnan(__x) && __builtin_isnan(__y)) { + using _Int = decltype(__ix); + constexpr int __nantype = __fmt == _Binary32 ? 22 : __fmt == _Binary64 ? 51 : __fmt == _Binary128 ? 111