diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-11-11 22:50:48 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-11-11 22:50:48 +0000 |
commit | 3aa34c1d8f94fc56d66de3b8d09dbd8c2c9e8525 (patch) | |
tree | 131a5405db6b77d647e372c65ba2c7ec3a8b9360 /gcc/fortran/parse.c | |
parent | c256f14362ccf94cbb302145e85fab84531ca61d (diff) | |
download | gcc-3aa34c1d8f94fc56d66de3b8d09dbd8c2c9e8525.zip gcc-3aa34c1d8f94fc56d66de3b8d09dbd8c2c9e8525.tar.gz gcc-3aa34c1d8f94fc56d66de3b8d09dbd8c2c9e8525.tar.bz2 |
re PR fortran/44054 (Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$ diagnostic (pragmas) and color)
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.
From-SVN: r217383
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 4539beb..f9c1683 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -550,7 +550,7 @@ decode_statement (void) stored an error message of some sort. */ if (gfc_error_check () == 0) - gfc_error_now ("Unclassifiable statement at %C"); + gfc_error_now_2 ("Unclassifiable statement at %C"); reject_statement (); @@ -797,7 +797,7 @@ decode_gcc_attribute (void) stored an error message of some sort. */ if (gfc_error_check () == 0) - gfc_error_now ("Unclassifiable GCC directive at %C"); + gfc_error_now_2 ("Unclassifiable GCC directive at %C"); reject_statement (); @@ -836,17 +836,17 @@ next_free (void) gfc_match_small_literal_int (&i, &cnt); if (cnt > 5) - gfc_error_now ("Too many digits in statement label at %C"); + gfc_error_now_2 ("Too many digits in statement label at %C"); if (i == 0) - gfc_error_now ("Zero is not a valid statement label at %C"); + gfc_error_now_2 ("Zero is not a valid statement label at %C"); do c = gfc_next_ascii_char (); while (ISDIGIT(c)); if (!gfc_is_whitespace (c)) - gfc_error_now ("Non-numeric character in statement label at %C"); + gfc_error_now_2 ("Non-numeric character in statement label at %C"); return ST_NONE; } @@ -858,7 +858,7 @@ next_free (void) if (at_bol && gfc_peek_ascii_char () == ';') { - gfc_error_now ("Semicolon at %C needs to be preceded by " + gfc_error_now_2 ("Semicolon at %C needs to be preceded by " "statement"); gfc_next_ascii_char (); /* Eat up the semicolon. */ return ST_NONE; @@ -917,8 +917,8 @@ next_free (void) if (at_bol && c == ';') { if (!(gfc_option.allow_std & GFC_STD_F2008)) - gfc_error_now ("Fortran 2008: Semicolon at %C without preceding " - "statement"); + gfc_error_now_2 ("Fortran 2008: Semicolon at %C without preceding " + "statement"); gfc_next_ascii_char (); /* Eat up the semicolon. */ return ST_NONE; } @@ -1017,7 +1017,7 @@ next_fixed (void) if (digit_flag) { if (label == 0) - gfc_warning_now ("Zero is not a valid statement label at %C"); + gfc_warning_now_2 ("Zero is not a valid statement label at %C"); else { /* We've found a valid statement label. */ |