re PR ada/17566 (Gnatxref formatting)
authorVincent Celier <celier@adacore.com>
Mon, 10 Aug 2009 08:25:05 +0000 (08:25 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 10 Aug 2009 08:25:05 +0000 (10:25 +0200)
2009-08-10  Vincent Celier  <celier@adacore.com>

PR ada/17566
* xref_lib.adb (Print_Xref): Make sure that there is at least one space
between a declaration name and its type.

From-SVN: r150617

gcc/ada/ChangeLog
gcc/ada/xref_lib.adb

index 87b5356..43bf836 100644 (file)
@@ -1,3 +1,9 @@
+2009-08-10  Vincent Celier  <celier@adacore.com>
+
+       PR ada/17566
+       * xref_lib.adb (Print_Xref): Make sure that there is at least one space
+       between a declaration name and its type.
+
 2009-08-07  Javier Miranda  <miranda@adacore.com>
 
        * exp_ch7.adb (Wrap_Transient_Expression): Add missing adjustment of
index 475f15e..f4d0fc2 100644 (file)
@@ -1607,10 +1607,16 @@ package body Xref_Lib is
 
          Write_Str (Get_Symbol (Decl));
 
-         while Column < Type_Position loop
+         --  Put the declaration type in column Type_Position, but if the
+         --  declaration name is too long, put at least one space between its
+         --  name and its type.
+
+         while Column < Type_Position - 1 loop
             Write_Char (' ');
          end loop;
 
+         Write_Char (' ');
+
          Write_Line (Get_Full_Type (Decl));
 
          Write_Parent_Info : declare