+2007-08-31 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/33232
+ * io.c (match_io): Also diagnose extra comma for READ.
+
2007-08-31 Joseph Myers <joseph@codesourcery.com>
* intrinsic.texi (LGAMMA): Remove empty @cindex line.
/* Optional leading comma (non-standard). */
if (!comma_flag
&& gfc_match_char (',') == MATCH_YES
- && k == M_WRITE
- && gfc_notify_std (GFC_STD_GNU, "Extension: Comma before output "
- "item list at %C is an extension") == FAILURE)
+ && gfc_notify_std (GFC_STD_GNU, "Extension: Comma before i/o "
+ "item list at %C") == FAILURE)
return MATCH_ERROR;
io_code = NULL;
+2007-08-31 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/33232
+ * gfortran.dg/eor_handling_2.f90: Add dg-warnings.
+ * gfortran.dg/read_1.f90: New.
+
2007-08-31 Paolo Carlini <pcarlini@suse.de>
PR c++/33210
program main
character(len=1) c1(10),c2(10)
open(77,status='scratch')
- write(77,'(A)') 'Line 1','Line 2','Line 3'
+ write(77,'(A)'), 'Line 1','Line 2','Line 3' ! { dg-warning "Comma before i/o item list" }
rewind(77)
- read(77,'(10A1)'), c1
- read(77,'(10A1)'), c2
+ read(77,'(10A1)'), c1 ! { dg-warning "Comma before i/o item list" }
+ read(77,'(10A1)'), c2 ! { dg-warning "Comma before i/o item list" }
if (c1(1) /= 'L' .or. c2(1) /= 'L') call abort
close(77)
end program main
--- /dev/null
+! { dg-do compile }
+!
+! Cf. PR fortran/33232
+program test
+ implicit none
+ integer :: a
+ READ *, a
+ READ '(i3)', a
+end program test