On 01/27/2015 01:31 PM, Martin Liška wrote:
On 01/27/2015 05:23 AM, DJ Delorie wrote:
+/* Workaround -Wstrict-overflow false positive during profiledbootstrap.  */
+
+# if GCC_VERSION >= 4004
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
+#endif
+

#pragma diagnostic ignored was added in 4.4 but #pragma diagnostic
push/pop wasn't added until a later release (4.6 I think).  Attempts
to build with 4.4 (i.e. on RHEL 6) causes warnings on most files.

Hello.

Thank you for pointing out, thus changing to 4006 would be the right fix?

Thanks,
Martin

2010-06-21  DJ Delorie  <d...@redhat.com>

         * diagnostic.h (diagnostic_classification_change_t): New.
         (diagnostic_context): Add history and push/pop list.
         (diagnostic_push_diagnostics): Declare.
         (diagnostic_pop_diagnostics): Declare.
         * diagnostic.c (diagnostic_classify_diagnostic): Store changes
         from pragmas in a history chain instead of the global table.
         (diagnostic_push_diagnostics): New.
         (diagnostic_pop_diagnostics): New.
         (diagnostic_report_diagnostic): Scan history chain to find state
         of diagnostics as of the diagnostic location.
         * opts.c (set_option): Pass UNKNOWN_LOCATION to
         diagnostic_classify_diagnostic.
         (enable_warning_as_error): Likewise.
         * diagnostic-core.h (DK_POP): Add after "real" diagnostics, for
         use in the history chain.
         * doc/extend.texi: Document pragma GCC diagnostic changes.



Hello.

There's a small patch that updates the version.

Ready for trunk?

Thanks,
Martin
>From 8d0b78b9106f3b9d1c0cdb6c191dc5ac5b93babe Mon Sep 17 00:00:00 2001
From: mliska <mli...@suse.cz>
Date: Fri, 30 Jan 2015 12:44:17 +0100
Subject: [PATCH] Guard GCC version for a pragma ifdef.

gcc/ChangeLog:

2015-01-30  Martin Liska  <mli...@suse.cz>

	* tree.h: Guard GCC version for a pragma ifdef.
---
 gcc/tree.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/tree.h b/gcc/tree.h
index 6c69fce..c3e9a63 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3052,7 +3052,7 @@ tree_int_cst_elt_check (tree __t, int __i,
 
 /* Workaround -Wstrict-overflow false positive during profiledbootstrap.  */
 
-# if GCC_VERSION >= 4004
+# if GCC_VERSION >= 4006
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wstrict-overflow"
 #endif
@@ -3068,7 +3068,7 @@ tree_vec_elt_check (tree __t, int __i,
   return &CONST_CAST_TREE (__t)->vec.a[__i];
 }
 
-# if GCC_VERSION >= 4004
+# if GCC_VERSION >= 4006
 #pragma GCC diagnostic pop
 #endif
 
-- 
2.1.2

Reply via email to