aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/parse.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@gcc.gnu.org>2010-06-25 21:01:04 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2010-06-25 21:01:04 +0200
commitc6c73c51ca12bd7672d17726416dd95519e15747 (patch)
tree219f02c65a2d3d51c0c49468db6604dc929faedd /gcc/fortran/parse.c
parent8e7745dce20f0cf618b50afab811955e37a7da10 (diff)
downloadgcc-c6c73c51ca12bd7672d17726416dd95519e15747.zip
gcc-c6c73c51ca12bd7672d17726416dd95519e15747.tar.gz
gcc-c6c73c51ca12bd7672d17726416dd95519e15747.tar.bz2
parse.c (next_free, next_fixed): Allow ";" as first character.
2010-06-25 Tobias Burnus <burnus@net-b.de> * 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. From-SVN: r161405
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r--gcc/fortran/parse.c10
1 files changed, 8 insertions, 2 deletions
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;
}