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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152147
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
+
+
2009-09-16 Michael Matz <matz@suse.de>
PR fortran/41212
i = buffer_flag;
buffer_flag = 0;
warnings++;
- if (warnings_are_errors)
- gfc_increment_error_count();
va_start (argp, nocmsgid);
error_print (_("Warning:"), _(nocmsgid), argp);
va_end (argp);
error_char ('\0');
+
+ if (warnings_are_errors)
+ gfc_increment_error_count();
+
buffer_flag = i;
}
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;
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 ();
+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 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/torture/builtin-math-7.c: Test complex int division at
--- /dev/null
+C { dg-do compile }
+C { dg-options "-Werror -fmax-errors=1" }
+100 ! { dg-warning "empty statement" }
+ end
+C { dg-error "count reached limit" "" { target *-*-* } 0 }
--- /dev/null
+! { dg-do compile }
+! { dg-options "-Werror -fmax-errors=1" }
+100 ! { dg-warning "empty statement" }
+end
+! { dg-error "count reached limit" "" { target *-*-* } 0 }
integer(kind=1) :: i
real :: r1, r2(3)
! gfc_warning_now:
-0 ! { dg-warning "Zero is not a valid statement label" }
+0 r1 = 0 ! { dg-warning "Zero is not a valid statement label" }
!
34 5 i=0
! gfc_notify_std(GFC_STD_F95_DEL):