public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r12-7474] libstdc++: Fix -Wunused-local-typedefs warning in <compare>
Date: Fri,  4 Mar 2022 11:27:52 +0000 (GMT)	[thread overview]
Message-ID: <20220304112752.551D63858D39@sourceware.org> (raw)

https://gcc.gnu.org/g:289f65d643e18210433e0f08ccaaf5b08b3d6f39

commit r12-7474-g289f65d643e18210433e0f08ccaaf5b08b3d6f39
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Mar 4 10:43:29 2022 +0000

    libstdc++: Fix -Wunused-local-typedefs warning in <compare>
    
    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


                 reply	other threads:[~2022-03-04 11:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220304112752.551D63858D39@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).