]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/ada/urealp.adb
sinput.ads, [...] (Unlock): New procedure.
[thirdparty/gcc.git] / gcc / ada / urealp.adb
index 4897bf12dc67783975a17c24c2eaa8b3c0d0d5e9..737e4b4e80ee59c47bcc3c85e04f8d57ee770777 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2006, 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- --
@@ -57,9 +57,23 @@ package body Urealp is
       --  Flag set if value is negative
    end record;
 
+   --  The following representation clause ensures that the above record
+   --  has no holes. We do this so that when instances of this record are
+   --  written by Tree_Gen, we do not write uninitialized values to the file.
+
+   for Ureal_Entry use record
+      Num      at  0 range 0 .. 31;
+      Den      at  4 range 0 .. 31;
+      Rbase    at  8 range 0 .. 31;
+      Negative at 12 range 0 .. 31;
+   end record;
+
+   for Ureal_Entry'Size use 16 * 8;
+   --  This ensures that we did not leave out any fields
+
    package Ureals is new Table.Table (
      Table_Component_Type => Ureal_Entry,
-     Table_Index_Type     => Ureal,
+     Table_Index_Type     => Ureal'Base,
      Table_Low_Bound      => Ureal_First_Entry,
      Table_Initial        => Alloc.Ureals_Initial,
      Table_Increment      => Alloc.Ureals_Increment,