* parse.c (next_free, next_fixed): Allow ";" as first character.
2010-06-25 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/semicolon_fixed.f: Update.
* gfortran.dg/semicolon_fixed_2.f: New.
* gfortran.dg/semicolon_free_2.f90: New.
* gfortran.dg/semicolon_free.f90: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161405
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-06-25 Tobias Burnus <burnus@net-b.de>
+
+ * parse.c (next_free, next_fixed): Allow ";" as first character.
+
2010-06-24 Tobias Burnus <burnus@net-b.de>
PR fortran/44614
if (at_bol && c == ';')
{
- gfc_error_now ("Semicolon at %C needs to be preceded by statement");
+ if (!(gfc_option.allow_std & GFC_STD_F2008))
+ gfc_error_now ("Fortran 2008: Semicolon at %C without preceding "
+ "statement");
gfc_next_ascii_char (); /* Eat up the semicolon. */
return ST_NONE;
}
if (c == ';')
{
- gfc_error_now ("Semicolon at %C needs to be preceded by statement");
+ if (digit_flag)
+ gfc_error_now ("Semicolon at %C needs to be preceded by statement");
+ else if (!(gfc_option.allow_std & GFC_STD_F2008))
+ gfc_error_now ("Fortran 2008: Semicolon at %C without preceding "
+ "statement");
return ST_NONE;
}
+2010-06-25 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/semicolon_fixed.f: Update.
+ * gfortran.dg/semicolon_fixed_2.f: New.
+ * gfortran.dg/semicolon_free_2.f90: New.
+ * gfortran.dg/semicolon_free.f90: Update.
+
2010-06-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/44448
2010-06-24 Andi Kleen <ak@linux.intel.com>
- * c-c++-common/warn-omitted-condop.c: New.
+ * c-c++-common/warn-omitted-condop.c: New.
2010-06-24 Tobias Burnus <burnus@net-b.de>
! { dg-do compile }
-! PR 19259 Semicolon cannot start a line
+! { dg-do options "-std=f2003" }
+!
+! PR 19259 Semicolon cannot start a line (in F2003)
x=1; y=1;
x=2;;
x=3;
- ; ! { dg-error "Semicolon at" }
- ;; ! { dg-error "Semicolon at" }
+ ; ! { dg-error "Fortran 2008: Semicolon at" }
+ ;; ! { dg-error "Fortran 2008: Semicolon at" }
900 ; ! { dg-error "Semicolon at" }
end
--- /dev/null
+! { dg-do compile }
+! { dg-do options "-std=f2008" }
+
+! PR 19259 Semicolon cannot start a line
+! but it F2008 it can!
+ x=1; y=1;
+ x=2;;
+ x=3;
+ ; ! OK
+ ;; ! OK
+ 900 ; ! { dg-error "Semicolon at" }
+ end
! { dg-do compile }
+! { dg-options "-std=f2003" }
! PR 19259 Semicolon cannot start a line
x=1; y=1;
x=2;;
--- /dev/null
+! { dg-do compile }
+! { dg-options "-std=f2008" }
+! PR 19259 Semicolon cannot start a line
+x=1; y=1;
+x=2;;
+x=3;
+ ; ! OK
+;; ! OK
+111 ; ! { dg-error "Semicolon at" }
+end