diff mbox

[Ada] Ada 2012 AI-0113 Detection of conflicting external tags

Message ID 20110802143917.GA5742@adacore.com
State New
Headers show

Commit Message

Arnaud Charlet Aug. 2, 2011, 2:39 p.m. UTC
This patch enables detection of conflicting external tags when compiling
under Ada 2005 mode. Required since this AI is a binding interpretation.

Tested on x86_64-pc-linux-gnu, committed on trunk

2011-08-02  Javier Miranda  <miranda@adacore.com>

	* exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
diff mbox

Patch

Index: exp_disp.adb
===================================================================
--- exp_disp.adb	(revision 177161)
+++ exp_disp.adb	(working copy)
@@ -5995,10 +5995,17 @@ 
 
       --     Check_TSD (TSD'Unrestricted_Access);
 
-      --  Seems wrong to restrict this BI to Ada 2012 ???
+      --  This check is a consequence of AI05-0113-1/06, so it officially
+      --  applies to Ada 2005 (and Ada 2012). It might be argued that it is
+      --  a desirable check to add in Ada 95 mode, but we hesitate to make
+      --  this change, as it would be incompatible, and could conceivably
+      --  cause a problem in existing Aa 95 code.
 
+      --  We check for No_Run_Time_Mode here, because we do not want to pick
+      --  up the RE_Check_TSD entity and call it in No_Run_Time mode.
+
       if not No_Run_Time_Mode
-        and then Ada_Version >= Ada_2012
+        and then Ada_Version >= Ada_2005
         and then RTE_Available (RE_Check_TSD)
       then
          Append_To (Elab_Code,