1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
2
3This file is part of GCC.
4
5GCC is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free
7Software Foundation; either version 3, or (at your option) any later
8version.
9
10GCC is distributed in the hope that it will be useful, but WITHOUT ANY
11WARRANTY; without even the implied warranty of MERCHANTABILITY or
12FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13for more details.
14
15You should have received a copy of the GNU General Public License
16along with GCC; see the file COPYING3. If not see
17<http://www.gnu.org/licenses/>. */
18
19/* DK_UNSPECIFIED must be first so it has a value of zero. We never
20 assign this kind to an actual diagnostic, we only use this in
21 variables that can hold a kind, to mean they have yet to have a
22 kind specified. I.e. they're uninitialized. Within the diagnostic
23 machinery, this kind also means "don't change the existing kind",
24 meaning "no change is specified". */
25DEFINE_DIAGNOSTIC_KIND (DK_UNSPECIFIED, "", NULL)
26
27/* If a diagnostic is set to DK_IGNORED, it won't get reported at all.
28 This is used by the diagnostic machinery when it wants to disable a
29 diagnostic without disabling the option which causes it. */
30DEFINE_DIAGNOSTIC_KIND (DK_IGNORED, "", NULL)
31
32/* The remainder are real diagnostic types. */
33DEFINE_DIAGNOSTIC_KIND (DK_FATAL, "fatal error: ", "error")
34DEFINE_DIAGNOSTIC_KIND (DK_ICE, "internal compiler error: ", "error")
35DEFINE_DIAGNOSTIC_KIND (DK_ERROR, "error: ", "error")
36DEFINE_DIAGNOSTIC_KIND (DK_SORRY, "sorry, unimplemented: ", "error")
37DEFINE_DIAGNOSTIC_KIND (DK_WARNING, "warning: ", "warning")
38DEFINE_DIAGNOSTIC_KIND (DK_ANACHRONISM, "anachronism: ", "warning")
39DEFINE_DIAGNOSTIC_KIND (DK_NOTE, "note: ", "note")
40DEFINE_DIAGNOSTIC_KIND (DK_DEBUG, "debug: ", "note")
41
42/* For use when using the diagnostic_show_locus machinery to show
43 a range of events within a path. */
44DEFINE_DIAGNOSTIC_KIND (DK_DIAGNOSTIC_PATH, "path: ", "path")
45
46/* These two would be re-classified as DK_WARNING or DK_ERROR, so the
47prefix does not matter. */
48DEFINE_DIAGNOSTIC_KIND (DK_PEDWARN, "pedwarn: ", NULL)
49DEFINE_DIAGNOSTIC_KIND (DK_PERMERROR, "permerror: ", NULL)
50/* This one is just for counting DK_WARNING promoted to DK_ERROR
51 due to -Werror and -Werror=warning. */
52DEFINE_DIAGNOSTIC_KIND (DK_WERROR, "error: ", NULL)
53/* This is like DK_ICE, but backtrace is not printed. Used in the driver
54 when reporting fatal signal in the compiler. */
55DEFINE_DIAGNOSTIC_KIND (DK_ICE_NOBT, "internal compiler error: ", "error")
56

source code of gcc/diagnostic.def