diff options
Diffstat (limited to 'gcc/ada/par-ch5.adb')
-rw-r--r-- | gcc/ada/par-ch5.adb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ada/par-ch5.adb b/gcc/ada/par-ch5.adb index fb31c34e5c6..46866ec6e5d 100644 --- a/gcc/ada/par-ch5.adb +++ b/gcc/ada/par-ch5.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- $Revision: 1.1 $ +-- $Revision$ -- -- -- Copyright (C) 1992-2001, Free Software Foundation, Inc. -- -- -- @@ -595,7 +595,20 @@ package body Ch5 is Scan; -- past semicolon Statement_Required := False; - -- Else we have a missing semicolon + -- A slash following an identifier or a selected + -- component in this situation is most likely a + -- period (have a look at the keyboard :-) + + elsif Token = Tok_Slash + and then (Nkind (Name_Node) = N_Identifier + or else + Nkind (Name_Node) = N_Selected_Component) + then + Error_Msg_SC ("""/"" should be ""."""); + Statement_Required := False; + raise Error_Resync; + + -- Else we have a missing semicolon else TF_Semicolon; |