From c6c73c51ca12bd7672d17726416dd95519e15747 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Fri, 25 Jun 2010 21:01:04 +0200 Subject: parse.c (next_free, next_fixed): Allow ";" as first character. 2010-06-25 Tobias Burnus * parse.c (next_free, next_fixed): Allow ";" as first character. 2010-06-25 Tobias Burnus * 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. From-SVN: r161405 --- gcc/fortran/ChangeLog | 4 ++++ gcc/fortran/parse.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index e887e6f..b635aec 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2010-06-25 Tobias Burnus + + * parse.c (next_free, next_fixed): Allow ";" as first character. + 2010-06-24 Tobias Burnus PR fortran/44614 diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 26ea73a..50f7957 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -717,7 +717,9 @@ next_free (void) 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; } @@ -853,7 +855,11 @@ next_fixed (void) 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; } -- cgit v1.1