diagnostic.def 2.4 KB

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