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