This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
This is the first step for moving Fortran to use the common
diagnostics machinery. This patch makes Fortran use the common
machinery for those warnings that don't have a location or a
controlling option.
Before:
manuel@gcc10:~/test1$ echo end | ./213518/build/gcc/f951
-fdiagnostics-color -Werror -x -
f951: error: command line option '-x -' is valid for the driver but
not for Fortran
Warning: Reading file '<stdin>' as free form
After:
manuel@gcc10:~/test1$ echo end | ./213518M/build/gcc/f951
-fdiagnostics-color -Werror -x -
f951: Error: command line option '-x -' is valid for the driver but
not for Fortran
f951: Error: Reading file '<stdin>' as free form [-Werror]
(Plus the colors that you cannot see in this mail).
Bootstrapped and regression tested on x86_64-linux-gnu.
OK?
2014-08-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
c-family/
* c-format.c: Handle Fortran flags.
* diagnostic.c (build_message_string): Make it extern.
* diagnostic.h (build_message_string): Make it extern.
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.
Attachment:
fortran-diagnostics-part1.diff
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |