diff mbox series

[8/13] v2 Use new per-location warning APIs in libcc1

Message ID fbf93789-fa6a-f042-ade7-39c207c34883@gmail.com
State New
Headers show
Series v2 warning control by group and location (PR 74765) | expand

Commit Message

Martin Sebor June 4, 2021, 9:42 p.m. UTC
The attached patch replaces the uses of TREE_NO_WARNING in libcc1 with
the new suppress_warning() API.

Comments

Jeff Law June 24, 2021, 5:04 a.m. UTC | #1
On 6/4/2021 3:42 PM, Martin Sebor via Gcc-patches wrote:
> The attached patch replaces the uses of TREE_NO_WARNING in libcc1 with
> the new suppress_warning() API.
>
> gcc-no-warning-libcc1.diff
>
> 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.
OK once prereqs are approved.
jeff
Martin Sebor June 28, 2021, 9:22 p.m. UTC | #2
On 6/23/21 11:04 PM, Jeff Law wrote:
> 
> 
> On 6/4/2021 3:42 PM, Martin Sebor via Gcc-patches wrote:
>> The attached patch replaces the uses of TREE_NO_WARNING in libcc1 with
>> the new suppress_warning() API.
>>
>> gcc-no-warning-libcc1.diff
>>
>> 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.
> OK once prereqs are approved.
> jeff
> 

Pushed in r12-1859.

Martin
diff mbox series

Patch

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;
 }