xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/fortran/gfc-diagnostic.def (revision 4c3eb207d36f67d31994830c0a694161fc1ca39b)
1*4c3eb207Smrg/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
2627f7eb2Smrg
3627f7eb2SmrgThis file is part of GCC.
4627f7eb2Smrg
5627f7eb2SmrgGCC is free software; you can redistribute it and/or modify it under
6627f7eb2Smrgthe terms of the GNU General Public License as published by the Free
7627f7eb2SmrgSoftware Foundation; either version 3, or (at your option) any later
8627f7eb2Smrgversion.
9627f7eb2Smrg
10627f7eb2SmrgGCC is distributed in the hope that it will be useful, but WITHOUT ANY
11627f7eb2SmrgWARRANTY; without even the implied warranty of MERCHANTABILITY or
12627f7eb2SmrgFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13627f7eb2Smrgfor more details.
14627f7eb2Smrg
15627f7eb2SmrgYou should have received a copy of the GNU General Public License
16627f7eb2Smrgalong with GCC; see the file COPYING3.  If not see
17627f7eb2Smrg<http://www.gnu.org/licenses/>.  */
18627f7eb2Smrg
19627f7eb2Smrg/* DK_UNSPECIFIED must be first so it has a value of zero.  We never
20627f7eb2Smrg   assign this kind to an actual diagnostic, we only use this in
21627f7eb2Smrg   variables that can hold a kind, to mean they have yet to have a
22627f7eb2Smrg   kind specified.  I.e. they're uninitialized.  Within the diagnostic
23627f7eb2Smrg   machinery, this kind also means "don't change the existing kind",
24627f7eb2Smrg   meaning "no change is specified".  */
25627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_UNSPECIFIED, "", NULL)
26627f7eb2Smrg
27627f7eb2Smrg/* If a diagnostic is set to DK_IGNORED, it won't get reported at all.
28627f7eb2Smrg   This is used by the diagnostic machinery when it wants to disable a
29627f7eb2Smrg   diagnostic without disabling the option which causes it.  */
30627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_IGNORED, "", NULL)
31627f7eb2Smrg
32627f7eb2Smrg/* The remainder are real diagnostic types.  */
33627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_FATAL, "Fatal Error", "error")
34627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_ICE, "internal compiler error", "error")
35627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_ERROR, "Error", "error")
36627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_SORRY, "sorry, unimplemented", "error")
37627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_WARNING, "Warning", "warning")
38627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_ANACHRONISM, "anachronism", "warning")
39627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_NOTE, "note", "note")
40627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_DEBUG, "debug", "note")
41627f7eb2Smrg/* These two would be re-classified as DK_WARNING or DK_ERROR, so the
42627f7eb2Smrgprefix does not matter.  */
43627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_PEDWARN, "pedwarn", NULL)
44627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_PERMERROR, "permerror", NULL)
45627f7eb2Smrg/* This one is just for counting DK_WARNING promoted to DK_ERROR
46627f7eb2Smrg   due to -Werror and -Werror=warning.  */
47627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_WERROR, "error", NULL)
48627f7eb2Smrg/* This is like DK_ICE, but backtrace is not printed.  Used in the driver
49627f7eb2Smrg   when reporting fatal signal in the compiler.  */
50627f7eb2SmrgDEFINE_DIAGNOSTIC_KIND (DK_ICE_NOBT, "internal compiler error", "error")
51