GCC Middle and Back End API Reference
kinds.h
Go to the documentation of this file.
1/* An enum used to discriminate severities of diagnostics.
2 Copyright (C) 1998-2025 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20#ifndef GCC_DIAGNOSTICS_KINDS_H
21#define GCC_DIAGNOSTICS_KINDS_H
22
23namespace diagnostics {
24
25/* Constants used to discriminate diagnostics. */
26enum class kind
27{
28#define DEFINE_DIAGNOSTIC_KIND(K, msgid, C) K,
29#include "diagnostics/kinds.def"
30#undef DEFINE_DIAGNOSTIC_KIND
32 /* This is used for tagging pragma pops in the diagnostic
33 classification history chain. */
35 /* This is used internally to note that a diagnostic is enabled
36 without mandating any specific type. */
38};
39
40extern const char *get_text_for_kind (enum diagnostics::kind);
41extern const char *get_debug_string_for_kind (enum diagnostics::kind);
42extern const char *get_color_for_kind (enum diagnostics::kind);
43
44} // namespace diagnostics
45
46#endif /* ! GCC_DIAGNOSTICS_KINDS_H */
Definition coretypes.h:167
const char * get_color_for_kind(enum kind kind)
Definition diagnostics/context.cc:732
kind
Definition kinds.h:27
@ any
Definition kinds.h:37
@ last_diagnostic_kind
Definition kinds.h:31
@ pop
Definition kinds.h:34
const char * get_text_for_kind(enum kind kind)
Definition diagnostics/context.cc:703
const char * get_debug_string_for_kind(enum kind kind)
Definition diagnostics/context.cc:716