diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-20 12:48:30 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-20 12:48:30 +0000 |
commit | e15291e53209a51e4c6bc8fdd8b97f61df539ec1 (patch) | |
tree | 1f271cac4cf83c94ad1306b32b1830442bb13b47 /gcc/ada/par-ch9.adb | |
parent | 83f9b25fc12b429eff0a737acdd9262dff4f32a6 (diff) | |
download | gcc-e15291e53209a51e4c6bc8fdd8b97f61df539ec1.tar.gz |
2008-05-20 Hristian Kirtchev <kirtchev@adacore.com>
* par-ch9.adb
(P_Protected): Update the error message on missing "-gnat05" switch when
using interfaces in conjunction with protected types. Remove the
incorrect error message associated with the presence of "private" after
a "with".
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135634 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par-ch9.adb')
-rw-r--r-- | gcc/ada/par-ch9.adb | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/ada/par-ch9.adb b/gcc/ada/par-ch9.adb index 6a24776e488..fcf2d3c69b4 100644 --- a/gcc/ada/par-ch9.adb +++ b/gcc/ada/par-ch9.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2007, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -477,7 +477,7 @@ package body Ch9 is Scan; -- past NEW if Ada_Version < Ada_05 then - Error_Msg_SP ("task interface is an Ada 2005 extension"); + Error_Msg_SP ("protected interface is an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); end if; @@ -496,11 +496,6 @@ package body Ch9 is end if; Scan; -- past WITH - - if Token = Tok_Private then - Error_Msg_SP - ("PRIVATE not allowed in protected type declaration"); - end if; end if; Set_Protected_Definition (Protected_Node, P_Protected_Definition); @@ -561,8 +556,8 @@ package body Ch9 is Append (Item_Node, Visible_Declarations (Def_Node)); end loop; - -- Deal with PRIVATE part (including graceful handling - -- of multiple PRIVATE parts). + -- Deal with PRIVATE part (including graceful handling of multiple + -- PRIVATE parts). Private_Loop : while Token = Tok_Private loop if No (Private_Declarations (Def_Node)) then |