diff options
author | Martin Sebor <msebor@redhat.com> | 2021-06-24 11:11:00 -0600 |
---|---|---|
committer | Martin Sebor <msebor@redhat.com> | 2021-06-24 19:23:42 -0600 |
commit | 7036e9ef462fde8181bece4ac4e03f3aa27204dc (patch) | |
tree | 97e05650a7da31613da89031358565ff38f0f111 /gcc/tree.h | |
parent | 980e278dbe5b50dc5a856ea627359c521f1cda53 (diff) | |
download | gcc-7036e9ef462fde8181bece4ac4e03f3aa27204dc.zip gcc-7036e9ef462fde8181bece4ac4e03f3aa27204dc.tar.gz gcc-7036e9ef462fde8181bece4ac4e03f3aa27204dc.tar.bz2 |
Add support for per-location warning groups.
gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Add diagnostic-spec.o.
* gengtype.c (open_base_files): Add diagnostic-spec.h.
* diagnostic-spec.c: New file.
* diagnostic-spec.h: New file.
* tree.h (no_warning, all_warnings, suppress_warning_at): New
declarations.
* warning-control.cc: New file.
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see #define GCC_TREE_H #include "tree-core.h" +#include "options.h" /* Convert a target-independent built-in function code to a combined_fn. */ @@ -6441,4 +6442,15 @@ public: operator location_t () const { return m_combined_loc; } }; +/* Code that doesn't refer to any warning. Has no effect on suppression + functions. */ +constexpr opt_code no_warning = opt_code (); +/* Wildcard code that refers to all warnings. */ +constexpr opt_code all_warnings = N_OPTS; + +/* Set the disposition for a warning (or all warnings by default) + at a location to disabled by default. */ +extern bool suppress_warning_at (location_t, opt_code = all_warnings, + bool = true); + #endif /* GCC_TREE_H */ |