diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-25 19:01:04 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-25 19:01:04 +0000 |
commit | 1b37751e20018b7c3fc58446fc80066f8698088a (patch) | |
tree | 219f02c65a2d3d51c0c49468db6604dc929faedd /gcc/fortran/parse.c | |
parent | f250798503228f3450989c93ae59c03a37b4ab5e (diff) | |
download | gcc-1b37751e20018b7c3fc58446fc80066f8698088a.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161405 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 26ea73a627c..50f795723eb 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; } |