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 is a patch with 2 hunks that are related to the same problem on
powerpc64le-unknown-linux-gnu.
Ready for trunk?
Thanks,
Martin
>From ea05ba5d0e4a5963e063564ffbec84f901111fac Mon Sep 17 00:00:00 2001
From: marxin <mli...@suse.cz>
Date: Tue, 3 Mar 2015 21:41:09 +0000
Subject: [PATCH] Fix warnings occured during profiledboostrap on
powerpc64le-unknown-linux-gnu.
gcc/ChangeLog:
2015-03-04 Martin Liska <mli...@suse.cz>
* ipa-inline.c (inline_small_functions): Set default value to
prevent warning during bootstrap.
* tree.h: Add pragma guard that ignores false positives during
bootstrap.
---
gcc/ipa-inline.c | 2 +-
gcc/tree.h | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index db77d12..9ac9c02 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -1710,7 +1710,7 @@ inline_small_functions (void)
FOR_EACH_DEFINED_FUNCTION (node)
{
bool update = false;
- struct cgraph_edge *next;
+ struct cgraph_edge *next = NULL;
bool has_speculative = false;
if (dump_file)
diff --git a/gcc/tree.h b/gcc/tree.h
index c3e9a63..8f93a51 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3278,6 +3278,11 @@ non_type_check (const_tree __t, const char *__f, int __l, const char *__g)
return __t;
}
+# if GCC_VERSION >= 4006
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
+#endif
+
inline const_tree *
tree_vec_elt_check (const_tree __t, int __i,
const char *__f, int __l, const char *__g)
@@ -3290,6 +3295,10 @@ tree_vec_elt_check (const_tree __t, int __i,
//return &__t->vec.a[__i];
}
+# if GCC_VERSION >= 4006
+#pragma GCC diagnostic pop
+#endif
+
inline const_tree *
omp_clause_elt_check (const_tree __t, int __i,
const char *__f, int __l, const char *__g)
--
2.1.2