public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-7474] libstdc++: Fix -Wunused-local-typedefs warning in <compare>
@ 2022-03-04 11:27 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2022-03-04 11:27 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-04 11:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 11:27 [gcc r12-7474] libstdc++: Fix -Wunused-local-typedefs warning in <compare> Jonathan Wakely

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).