-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2007, 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- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
+-- Public License distributed with GNAT; see file COPYING3. If not, go to --
+-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
else
Item := First (Config_Pragmas);
Error_Msg_N
- ("cannot compile configuration pragmas with gcc", Item);
+ ("cannot compile configuration pragmas with gcc!", Item);
Error_Msg_N
- ("use gnatchop -c to process configuration pragmas!", Item);
+ ("\use gnatchop -c to process configuration pragmas!", Item);
raise Unrecoverable_Error;
end if;
if Token = Tok_Private then
Private_Sloc := Token_Ptr;
Set_Keyword_Casing (Current_Source_File, Determine_Token_Casing);
- if Style_Check then Style.Check_Indentation; end if;
+ if Style_Check then
+ Style.Check_Indentation;
+ end if;
Save_Scan_State (Scan_State); -- at PRIVATE
Scan; -- past PRIVATE
-- it hasn't already been done on seeing a WITH or PRIVATE.
Set_Keyword_Casing (Current_Source_File, Determine_Token_Casing);
- if Style_Check then Style.Check_Indentation; end if;
+ if Style_Check then
+ Style.Check_Indentation;
+ end if;
-- Remaining processing depends on particular type of compilation unit
-- Loop through context items
loop
- if Style_Check then Style.Check_Indentation; end if;
+ if Style_Check then
+ Style.Check_Indentation;
+ end if;
-- Gather any pragmas appearing in the context clause
return Item_List;
elsif Ada_Version < Ada_05 then
- Error_Msg_SP ("PRIVATE WITH is an Ada 2005 extension");
+ Error_Msg_SP ("`PRIVATE WITH` is an Ada 2005 extension");
Error_Msg_SP
("\unit must be compiled with -gnat05 switch");
end if;
if Token = Tok_Type then
- -- WITH TYPE is an GNAT specific extension
+ -- WITH TYPE is an obsolete GNAT specific extension
- if not Extensions_Allowed then
- Error_Msg_SP ("`WITH TYPE` is a 'G'N'A'T extension");
- Error_Msg_SP ("\unit must be compiled with -gnatX switch");
- end if;
+ Error_Msg_SP
+ ("`WITH TYPE` is an obsolete 'G'N'A'T extension");
+ Error_Msg_SP ("\use Ada 2005 `LIMITED WITH` clause instead");
Scan; -- past TYPE
- With_Node := New_Node (N_With_Type_Clause, Token_Ptr);
- Append (With_Node, Item_List);
- Set_Name (With_Node, P_Qualified_Simple_Name);
T_Is;
if Token = Tok_Tagged then
- Set_Tagged_Present (With_Node);
Scan;
elsif Token = Tok_Access then