From b5c739f9f5969b4803b40467822b0b64e0ecd35e Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Tue, 10 Aug 2010 13:50:53 +0000 Subject: a-chahan.ads: Add comments on handling of obsolescent entries. 2010-08-10 Robert Dewar * a-chahan.ads: Add comments on handling of obsolescent entries. * opt.ads: Add Ada_2005 and Ada_2012 renamings for versions. * restrict.adb (Check_Obsolescent_2005_Entity): New procedure. * restrict.ads (Check_Obsolescent_2005_Entity): New procedure. * sem_attr.adb (Analyze_Access_Attribute): Call Check_Obsolescent_2005_Entity to check for access to obsolescent Ada.Characters.Handling subprogram. (Analyze_Attribute, case Class): Applying Class to untagged incomplete type is obsolescent in Ada 2005. (Analyze_Attribute, case Constrained): Better placement of flag when flagged as obsolescent feature. (Analyze_Attribute, case Storage_Size): Use with tasks is obsolescent * sem_ch10.adb (Analyze_With_Clause): With of renamings such as Text_IO is an obsolescent feature. * sem_ch11.adb (Analyze_Raise_Statement): Numeric_Error is obsolescent feature. * sem_ch8.adb (Analyze_Subprogram_Renaming): Call Check_Obsolescent_2005_Entity to check for renaming obsolete Ada.Characters.Handling subprogram. * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Check for obsolescent restrictions in Ada 2005. (Analyze_Pragma, case Suppress): Entity arg is obsolescent in Ada 2005 (Analyze_Pragma, case Interface): Interface is obsolescent in Ada 2005 * sem_res.adb (Resolve_Call): Call Check_Obsolescent_2005_Entity to check for obsolescent references to Ada.Characters.Handling subprograms 2010-08-10 Robert Dewar * einfo.adb, einfo.ads: Fix bad -gnatdt output for incomplete type. 2010-08-10 Robert Dewar * errout.ads: Add VMS table entries for 2005, 12, 2012 switches * par-ch4.adb: Change wording of Ada 2012 messages * vms_data.ads: Add VMS entries for /2005, /12, /2012 From-SVN: r163063 --- gcc/ada/sem_ch8.adb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/ada/sem_ch8.adb') diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index 6958862..5ddd96a 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -2467,6 +2467,7 @@ package body Sem_Ch8 is end if; -- A useful warning, suggested by Ada Bug Finder (Ada-Europe 2005) + -- is to warn if an operator is being renamed as a different operator. if Comes_From_Source (N) and then Present (Old_S) @@ -2479,6 +2480,10 @@ package body Sem_Ch8 is New_S, Old_S); end if; + -- Check for renaming of obsolescent subprogram + + Check_Obsolescent_2005_Entity (Entity (Nam), Nam); + -- Another warning or some utility: if the new subprogram as the same -- name as the old one, the old one is not hidden by an outer homograph, -- the new one is not a public symbol, and the old one is otherwise -- cgit v1.1