From 6d93ae145ef49eb37b5d32007d4e6c51e3dcfc86 Mon Sep 17 00:00:00 2001 From: Vincent Celier Date: Mon, 10 Aug 2009 08:25:05 +0000 Subject: [PATCH] re PR ada/17566 (Gnatxref formatting) 2009-08-10 Vincent Celier 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 | 6 ++++++ gcc/ada/xref_lib.adb | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 87b5356..43bf836 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2009-08-10 Vincent Celier + + 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 * exp_ch7.adb (Wrap_Transient_Expression): Add missing adjustment of diff --git a/gcc/ada/xref_lib.adb b/gcc/ada/xref_lib.adb index 475f15e..f4d0fc2 100644 --- a/gcc/ada/xref_lib.adb +++ b/gcc/ada/xref_lib.adb @@ -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 -- 2.7.4