Patchwork [Ada] Clean up of gnatbind output (for non-standard run times)

login
register
mail settings
Submitter Arnaud Charlet
Date Oct. 29, 2012, 10:53 a.m.
Message ID <20121029105315.GA12389@adacore.com>
Download mbox | patch
Permalink /patch/194962/
State New
Headers show

Comments

Arnaud Charlet - Oct. 29, 2012, 10:53 a.m.
A declaration for Is_Elaborated was emitted but never referenced.
No functional change.

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

2012-10-29  Tristan Gingold  <gingold@adacore.com>

	* bindgen.adb (Gen_Output_File_Ada): Do not emit declaration for
	Is_Elaborated if not referenced.

Patch

Index: bindgen.adb
===================================================================
--- bindgen.adb	(revision 192922)
+++ bindgen.adb	(working copy)
@@ -2394,8 +2394,13 @@ 
 
          --  The B.1 (39) implementation advice says that the adainit/adafinal
          --  routines should be idempotent. Generate a flag to ensure that.
+         --  This is not needed if we are suppressing the standard library
+         --  since it would never be referenced.
 
-         WBI ("   Is_Elaborated : Boolean := False;");
+         if not Suppress_Standard_Library_On_Target then
+            WBI ("   Is_Elaborated : Boolean := False;");
+         end if;
+
          WBI ("");
       end if;