From 1b37751e20018b7c3fc58446fc80066f8698088a Mon Sep 17 00:00:00 2001 From: burnus Date: Fri, 25 Jun 2010 19:01:04 +0000 Subject: 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161405 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/parse.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc/fortran/parse.c') 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; } -- cgit v1.2.1