diff mbox series

[12/13] v2 Remove TREE_NO_WARNING and gimple*no_warning* APIs

Message ID 9902ab65-65a7-a40f-7b4e-864e6c3250dc@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:43 p.m. UTC
The attached patch removes the definitions of the TREE_NO_WARNING macro
and the gimple_get_no_warning_p() and gimple_set_no_warning() functions.

Comments

Jeff Law June 24, 2021, 5:01 a.m. UTC | #1
On 6/4/2021 3:43 PM, Martin Sebor via Gcc-patches wrote:
> The attached patch removes the definitions of the TREE_NO_WARNING macro
> and the gimple_get_no_warning_p() and gimple_set_no_warning() functions.
>
> gcc-no-warning-remove-api.diff
>
> Remove legacy TREE_NO_WARNING amd gimple_*no_warning* APIs.
>
> gcc/ChangeLog:
>
> 	* tree.h (TREE_NO_WARNING): Remove.
> 	* gimple.h (gimple_no_warning_p): Remove.
> 	(gimple_suppress_warning): Same.
Is there any value in marking these as poisoned?  We've done that for 
some macros in the past, but we haven't been consistent with it.    If 
you think it's worth poisoning, the place to do that is system.h.

Approved with or without poisoning once prereqs are approved.

jeff
diff mbox series

Patch

Remove legacy TREE_NO_WARNING amd gimple_*no_warning* APIs.

gcc/ChangeLog:

	* tree.h (TREE_NO_WARNING): Remove.
	* gimple.h (gimple_no_warning_p): Remove.
	(gimple_suppress_warning): Same.

diff --git a/gcc/tree.h b/gcc/tree.h
index 62b2de46479..3c92c58980e 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -699,13 +700,6 @@  extern void omp_clause_range_check_failed (const_tree, const char *, int,
 /* Determines whether an ENUMERAL_TYPE has defined the list of constants. */
 #define ENUM_IS_OPAQUE(NODE) (ENUMERAL_TYPE_CHECK (NODE)->base.private_flag)
 
-/* In an expr node (usually a conversion) this means the node was made
-   implicitly and should not lead to any sort of warning.  In a decl node,
-   warnings concerning the decl should be suppressed.  This is used at
-   least for used-before-set warnings, and it set after one warning is
-   emitted.  */
-#define TREE_NO_WARNING(NODE) ((NODE)->base.nowarning_flag)
-
 /* Nonzero if we should warn about the change in empty class parameter
    passing ABI in this TU.  */
 #define TRANSLATION_UNIT_WARN_EMPTY_P(NODE) \
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 91b92b4a4d1..ca5d4acfc71 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -1948,22 +1969,6 @@  gimple_seq_singleton_p (gimple_seq seq)
 	  && (gimple_seq_first (seq) == gimple_seq_last (seq)));
 }
 
-/* Return true if no warnings should be emitted for statement STMT.  */
-
-static inline bool
-gimple_no_warning_p (const gimple *stmt)
-{
-  return stmt->no_warning;
-}
-
-/* Set the no_warning flag of STMT to NO_WARNING.  */
-
-static inline void
-gimple_set_no_warning (gimple *stmt, bool no_warning)
-{
-  stmt->no_warning = (unsigned) no_warning;
-}
-
 /* Set the visited status on statement STMT to VISITED_P.
 
    Please note that this 'visited' property of the gimple statement is