https://gcc.gnu.org/g:7754a8b7b4978ad82aef3ad456c5f60460b47393

commit r15-4040-g7754a8b7b4978ad82aef3ad456c5f60460b47393
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Thu Oct 3 11:03:41 2024 +0100

    libstdc++: Fix -Wdeprecated-declarations warning for Parallel Mode 
[PR116944]
    
    The pragmas to disable warnings need to be moved before the first use of
    the deprecated classes.
    
    libstdc++-v3/ChangeLog:
    
            PR libstdc++/116944
            * include/parallel/base.h: Move diagnostic pragmas earlier.

Diff:
---
 libstdc++-v3/include/parallel/base.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/include/parallel/base.h 
b/libstdc++-v3/include/parallel/base.h
index fcbcc1e0b996..4341e26baf0b 100644
--- a/libstdc++-v3/include/parallel/base.h
+++ b/libstdc++-v3/include/parallel/base.h
@@ -150,6 +150,9 @@ namespace __gnu_parallel
     max(const _Tp& __a, const _Tp& __b)
     { return (__a > __b) ? __a : __b; }
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // *nary_function
+
   /** @brief Constructs predicate for equality from strict weak
    *  ordering predicate
    */
@@ -166,9 +169,6 @@ namespace __gnu_parallel
       { return !_M_comp(__a, __b) && !_M_comp(__b, __a); }
     };
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // *nary_function
-
   /** @brief Similar to std::unary_negate,
    *  but giving the argument types explicitly. */
   template<typename _Predicate, typename argument_type>

Reply via email to