From patchwork Wed Mar 4 13:18:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 446232 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id ADB05140134 for ; Thu, 5 Mar 2015 00:18:50 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=RlWjqYgI; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; q=dns; s=default; b=RERAhdU6V3D0Vmml4 XMmKgDo5Q0DhLaXf9m3HhgslKk3vqKYyuhqaQM87UnKTeIuLLCMDmHd1JKqRuWiW ZWTcrkBhzzbl1TVSfZiI5yL90r8nIiEWnzfIybLvfNzH4zJAS4O3aex4zw2wGhdf ZocSON4iceN48qib7JQSvithmk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=default; bh=04CJ7WozPPFyQqAk4FKkNHC D2MA=; b=RlWjqYgIuAIjZ9UATjghmjiLmt1QzZxrYBDCD9IGznabWcahoJYWZjd E/tpvENM/LHyKuLx5ED278+/ZyErEPodNuGJgbK1F0GvYMDuuniX6e16BIezO988 5pVPIUy9jj5CkxAv9GOA75r9cwXWHh5q2J42cqPDDogBSublE8QQ= Received: (qmail 75559 invoked by alias); 4 Mar 2015 13:18:41 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 75550 invoked by uid 89); 4 Mar 2015 13:18:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 04 Mar 2015 13:18:39 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 567EAABF8 for ; Wed, 4 Mar 2015 13:18:36 +0000 (UTC) Message-ID: <54F7062B.9040706@suse.cz> Date: Wed, 04 Mar 2015 14:18:35 +0100 From: =?windows-1252?Q?Martin_Li=9Aka?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Workaround -Wmaybe-uninitialized false positives during profiledbootstrap References: <20150115111038.GD1405@tucnak.redhat.com> <20150115112905.GF1405@tucnak.redhat.com> <54BD1844.1060203@suse.cz> <20150119144800.GL1405@tucnak.redhat.com> <54BD4D41.1050506@suse.cz> <201501270423.t0R4NCnO017873@greed.delorie.com> <54C78521.5070706@suse.cz> In-Reply-To: <54C78521.5070706@suse.cz> X-IsSubscribed: yes 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 >> >> * 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 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 * 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