From patchwork Fri Jun 4 21:42:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sebor X-Patchwork-Id: 1488134 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=FrqVAy9o; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fxbyk2XBQz9sPf for ; Sat, 5 Jun 2021 07:49:50 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6138E39A241B for ; Fri, 4 Jun 2021 21:49:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6138E39A241B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1622843388; bh=lUThgRmjypXl7sYspBnu+Xh1cpjmSK+RNM9zWF6lUeI=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=FrqVAy9o1gAulX2xkhq2WNvpxpLj/VZry0bw01Ffr34ZqHrIkPpKuXMXHPS+mF+5o VUAWJHmdMI1K3QzJVoccfO9rSELCem8puAdM0zgFK3w/Hen36Zd7eAnLKH/halZmG0 q+lZOBvqgwLZnEULy4aXu3s7B/3MvlofZfzAmohE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 5884B39A1439 for ; Fri, 4 Jun 2021 21:42:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5884B39A1439 Received: by mail-oi1-x22c.google.com with SMTP id z3so11145482oib.5 for ; Fri, 04 Jun 2021 14:42:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=lUThgRmjypXl7sYspBnu+Xh1cpjmSK+RNM9zWF6lUeI=; b=Vjr8LPoi3flP5L+qmwYqx8nf244zkSJ/2+lx0vJVaOPGIbQQPR67bKG7IQfvOj4x6b SPdRe4qCpVx/3XBSI1nPnnTwh6keYDdh6VvXWjdZVlIN98qtu0QFxD9EsOoAxvXtzugG 4aEompH2OfWD3I8HQVbqOHUJ6gBl+eoyPqhVQHsKkKlRy87W27yl5tKabwGSVKl/2NDp zaBE7lKK6ij4VXEEhBzJ6GW/BBLIHhoyfwlqb/+MVn6qMp04bXCQSAs9MJj0zCkI67q1 gjo28cCOBZYW5QEixhqD7RLEHzGp4Jo7xkUeKte8mWu8NcpeJHLHPq5gXsWqqigJiLnn jq+A== X-Gm-Message-State: AOAM533G3DnntMhcKSWvr61s7aisc9le4KZghvW8qZJh2V7H8Ce9WqB5 wN+JKAqGl8Bq8kbamxkYzqVy1Gih5Eo= X-Google-Smtp-Source: ABdhPJxOI7rCea6flnZ3h542pmqYI2zbmsr5k4L2jt/VpwWz3lqxLPaFn2uJ6JwLUvgfrLVsnuxqPQ== X-Received: by 2002:aca:280a:: with SMTP id 10mr12719630oix.13.1622842977739; Fri, 04 Jun 2021 14:42:57 -0700 (PDT) Received: from [192.168.0.41] (184-96-226-253.hlrn.qwest.net. [184.96.226.253]) by smtp.gmail.com with ESMTPSA id u24sm740381otg.73.2021.06.04.14.42.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Jun 2021 14:42:57 -0700 (PDT) Subject: [PATCH 8/13] v2 Use new per-location warning APIs in libcc1 To: gcc-patches References: <92db3776-af59-fa20-483b-aa67b17d0751@gmail.com> <47d06c821a53f5bd2246f0fca2c9a693bff6b882.camel@redhat.com> <3a5ea83c-0d91-d123-f537-f8f1223df890@gmail.com> Message-ID: Date: Fri, 4 Jun 2021 15:42:56 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <3a5ea83c-0d91-d123-f537-f8f1223df890@gmail.com> Content-Language: en-US X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Martin Sebor via Gcc-patches From: Martin Sebor Reply-To: Martin Sebor Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" The attached patch replaces the uses of TREE_NO_WARNING in libcc1 with the new suppress_warning() API. Add support for per-location warning groups. libcc1/ChangeLog: * libcp1plugin.cc (record_decl_address): Replace a direct use of TREE_NO_WARNING with suppress_warning. diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc index 79694b91964..ea6ee553401 100644 --- a/libcc1/libcp1plugin.cc +++ b/libcc1/libcp1plugin.cc @@ -541,7 +541,7 @@ record_decl_address (plugin_context *ctx, decl_addr_value value) **slot = value; /* We don't want GCC to warn about e.g. static functions without a code definition. */ - TREE_NO_WARNING (value.decl) = 1; + suppress_warning (value.decl); return *slot; }