diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2009-09-24 21:53:36 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2009-09-24 21:53:36 +0000 |
commit | bbffcb7eab761f5223678e7153be5d51560c33eb (patch) | |
tree | a18fbbc34372ef34d15127a85a1e198e639d0e5a /gcc/fortran/parse.c | |
parent | e3d5405d071e33540d70c62c6e24a2dfa7cc7d9d (diff) | |
download | gcc-bbffcb7eab761f5223678e7153be5d51560c33eb.zip gcc-bbffcb7eab761f5223678e7153be5d51560c33eb.tar.gz gcc-bbffcb7eab761f5223678e7153be5d51560c33eb.tar.bz2 |
re PR fortran/41459 (Error not printed with -Werror and -fmax-errors=1)
2009-09-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/41459
* gfortran.dg/empty_label.f: New test.
* gfortran.dg/empty_label.f90: Ditto.
* gfortran.dg/warnings_are_errors_1.f: Fix to emit a single warning.
2009-09-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/41459
* error.c(gfc_warning_now): Move warnings_are_errors test to
after actual emitting of the warning.
* parse.c (next_free): Improve error locus printing.
(next_fixed): Change gfc_warn to gfc_warning_now, and improve
locus reporting.
From-SVN: r152147
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index e743989..93a6cfd 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -655,7 +655,7 @@ next_free (void) if (gfc_match_eos () == MATCH_YES) { gfc_warning_now ("Ignoring statement label in empty statement " - "at %C"); + "at %L", &label_locus); gfc_free_st_label (gfc_statement_label); gfc_statement_label = NULL; return ST_NONE; @@ -848,7 +848,8 @@ next_fixed (void) blank_line: if (digit_flag) - gfc_warning ("Ignoring statement label in empty statement at %C"); + gfc_warning_now ("Ignoring statement label in empty statement at %L", + &label_locus); gfc_current_locus.lb->truncated = 0; gfc_advance_line (); |