diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-11 22:50:48 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-11 22:50:48 +0000 |
commit | 766928aa6ac2c846c2d098ef4ef9e220feb4dcab (patch) | |
tree | 131a5405db6b77d647e372c65ba2c7ec3a8b9360 /gcc/fortran/module.c | |
parent | 9fcfed2eb95fea03d967dfcadd1eec9cbab4a744 (diff) | |
download | gcc-766928aa6ac2c846c2d098ef4ef9e220feb4dcab.tar.gz |
libcpp/ChangeLog:
2014-11-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* include/line-map.h (linemap_position_for_loc_and_offset):
Declare.
* line-map.c (linemap_position_for_loc_and_offset): New.
gcc/fortran/ChangeLog:
2014-11-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* gfortran.h (warn_use_without_only): Remove.
(gfc_diagnostics_finish): Declare.
* error.c: Include tree-diagnostics.h
(gfc_format_decoder): New.
(gfc_diagnostics_init): Use gfc_format_decoder. Set default caret
char.
(gfc_diagnostics_finish): Restore tree diagnostics defaults, but
keep gfc_diagnostics_starter and finalizer. Restore default caret.
* options.c: Remove all uses of warn_use_without_only.
* lang.opt (Wuse-without-only): Add Var.
* f95-lang.c (gfc_be_parse_file): Call gfc_diagnostics_finish.
* module.c (gfc_use_module): Use gfc_warning_now_2.
* parse.c (decode_statement): Likewise.
(decode_gcc_attribute): Likewise.
(next_free): Likewise.
(next_fixed): Likewise.
gcc/testsuite/ChangeLog:
2014-11-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* lib/gfortran-dg.exp: Update regexp to match locus and message
without caret.
* gfortran.dg/use_without_only_1.f90: Add column numbers.
* gfortran.dg/warnings_are_errors_1.f: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217383 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 1c020700ba0..56351f02c04 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -6744,8 +6744,9 @@ gfc_use_module (gfc_use_list *module) only_flag = module->only_flag; current_intmod = INTMOD_NONE; - if (!only_flag && gfc_option.warn_use_without_only) - gfc_warning_now ("USE statement at %C has no ONLY qualifier"); + if (!only_flag) + gfc_warning_now_2 (OPT_Wuse_without_only, + "USE statement at %C has no ONLY qualifier"); filename = XALLOCAVEC (char, strlen (module_name) + strlen (MODULE_EXTENSION) + 1); |