Re: [PATCH 5/13] v2 Use new per-location warning APIs in the RL78 back end

2021-06-23 Thread Jeff Law via Gcc-patches




On 6/4/2021 3:42 PM, Martin Sebor via Gcc-patches wrote:

The attached patch replaces the uses of TREE_NO_WARNING in the RL78
back end with the new suppress_warning() and warning_suppressed_p()
APIs.

gcc-no-warning-rl78.diff

Add support for per-location warning groups.

gcc/ChangeLog:

* config/rl78/rl78.c (rl78_handle_naked_attribute): Replace a direct
use of TREE_NO_WARNING with suppress_warning.

OK once prereqs are approved.

Jeff


[PATCH 5/13] v2 Use new per-location warning APIs in the RL78 back end

2021-06-04 Thread Martin Sebor via Gcc-patches

The attached patch replaces the uses of TREE_NO_WARNING in the RL78
back end with the new suppress_warning() and warning_suppressed_p()
APIs.
Add support for per-location warning groups.

gcc/ChangeLog:

	* config/rl78/rl78.c (rl78_handle_naked_attribute): Replace a direct
	use of TREE_NO_WARNING with suppress_warning.

diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c
index 4c34949a97f..22d1690a035 100644
--- a/gcc/config/rl78/rl78.c
+++ b/gcc/config/rl78/rl78.c
@@ -847,7 +847,7 @@ rl78_handle_naked_attribute (tree * node,
   /* Disable warnings about this function - eg reaching the end without
  seeing a return statement - because the programmer is doing things
  that gcc does not know about.  */
-  TREE_NO_WARNING (* node) = 1;
+  suppress_warning (* node);
 
   return NULL_TREE;
 }