diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-15 15:10:15 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-15 15:10:15 +0000 |
commit | dc8078a346fcfa8315589cce06808c03a5804d98 (patch) | |
tree | ff48278d43446ffb9145fbbac3289b0d898cacfa /gcc/fortran/gfc-diagnostic.def | |
parent | b71839120cfa70f06e5c03d7c9cbb63884a3890b (diff) | |
download | gcc-dc8078a346fcfa8315589cce06808c03a5804d98.tar.gz |
2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
gcc/
* diagnostic.c (build_message_string): Make it extern.
* diagnostic.h (build_message_string): Make it extern.
c-family/
* c-format.c: Handle Fortran flags.
fortran/
* gfortran.h: Define GCC_DIAG_STYLE.
(gfc_diagnostics_init,gfc_warning_cmdline): Declare.
* trans-array.c: Include gfortran.h before diagnostic-core.h.
* trans-expr.c: Likewise.
* trans-openmp.c: Likewise.
* trans-const.c: Likewise.
* trans.c: Likewise.
* trans-types.c: Likewise.
* f95-lang.c: Likewise.
* trans-decl.c: Likewise.
* trans-io.c: Likewise.
* trans-intrinsic.c: Likewise.
* error.c: Include diagnostic.h and diagnostic-color.h.
(gfc_diagnostic_build_prefix): New.
(gfc_diagnostic_starter): New.
(gfc_diagnostic_finalizer): New.
(gfc_warning_cmdline): New.
(gfc_diagnostics_init): New.
* gfc-diagnostic.def: New.
* options.c (gfc_init_options): Call gfc_diagnostics_init.
(gfc_post_options): Use gfc_warning_cmdline.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214024 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/gfc-diagnostic.def')
-rw-r--r-- | gcc/fortran/gfc-diagnostic.def | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gcc/fortran/gfc-diagnostic.def b/gcc/fortran/gfc-diagnostic.def new file mode 100644 index 00000000000..0f1044de9ca --- /dev/null +++ b/gcc/fortran/gfc-diagnostic.def @@ -0,0 +1,47 @@ +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. */ + +/* DK_UNSPECIFIED must be first so it has a value of zero. We never + assign this kind to an actual diagnostic, we only use this in + variables that can hold a kind, to mean they have yet to have a + kind specified. I.e. they're uninitialized. Within the diagnostic + machinery, this kind also means "don't change the existing kind", + meaning "no change is specified". */ +DEFINE_DIAGNOSTIC_KIND (DK_UNSPECIFIED, "", NULL) + +/* If a diagnostic is set to DK_IGNORED, it won't get reported at all. + This is used by the diagnostic machinery when it wants to disable a + diagnostic without disabling the option which causes it. */ +DEFINE_DIAGNOSTIC_KIND (DK_IGNORED, "", NULL) + +/* The remainder are real diagnostic types. */ +DEFINE_DIAGNOSTIC_KIND (DK_FATAL, "fatal error", "error") +DEFINE_DIAGNOSTIC_KIND (DK_ICE, "internal compiler error", "error") +DEFINE_DIAGNOSTIC_KIND (DK_ERROR, "Error", "error") +DEFINE_DIAGNOSTIC_KIND (DK_SORRY, "sorry, unimplemented", "error") +DEFINE_DIAGNOSTIC_KIND (DK_WARNING, "Warning", "warning") +DEFINE_DIAGNOSTIC_KIND (DK_ANACHRONISM, "anachronism", "warning") +DEFINE_DIAGNOSTIC_KIND (DK_NOTE, "note", "note") +DEFINE_DIAGNOSTIC_KIND (DK_DEBUG, "debug", "note") +/* These two would be re-classified as DK_WARNING or DK_ERROR, so the +prefix does not matter. */ +DEFINE_DIAGNOSTIC_KIND (DK_PEDWARN, "pedwarn", NULL) +DEFINE_DIAGNOSTIC_KIND (DK_PERMERROR, "permerror", NULL) +/* This one is just for counting DK_WARNING promoted to DK_ERROR + due to -Werror and -Werror=warning. */ +DEFINE_DIAGNOSTIC_KIND (DK_WERROR, "error", NULL) |