diff options
author | Vincent Celier <celier@adacore.com> | 2007-12-13 11:23:55 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-12-13 11:23:55 +0100 |
commit | 987c5cecd034d57ef50e2e93266acd15e693f3e7 (patch) | |
tree | c64e65f11cf89473c38231819868296bb12ca177 | |
parent | ce0bead308a024b906092bb0395b7ed67c53b56e (diff) | |
download | gcc-987c5cecd034d57ef50e2e93266acd15e693f3e7.zip gcc-987c5cecd034d57ef50e2e93266acd15e693f3e7.tar.gz gcc-987c5cecd034d57ef50e2e93266acd15e693f3e7.tar.bz2 |
errout.adb (Output_Source_Line): Do not keep a trailing space after the source line number if...
2007-12-06 Vincent Celier <celier@adacore.com>
* errout.adb (Output_Source_Line): Do not keep a trailing space after
the source line number if the source line is empty.
From-SVN: r130826
-rw-r--r-- | gcc/ada/errout.adb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb index ac61cf9..adf6435 100644 --- a/gcc/ada/errout.adb +++ b/gcc/ada/errout.adb @@ -1783,6 +1783,9 @@ package body Errout is Line_Number_Output : Boolean := False; -- Set True once line number is output + Empty_Line : Boolean := True; + -- Set False if line includes at least one character + begin if Sfile /= Current_Error_Source_File then Write_Str ("==============Error messages for "); @@ -1870,6 +1873,7 @@ package body Errout is end if; end if; + Empty_Line := False; S := S + 1; end loop; @@ -1877,7 +1881,11 @@ package body Errout is -- training spaces preserved (so we output the line exactly as input). if Line_Number_Output then - Write_Eol_Keep_Blanks; + if Empty_Line then + Write_Eol; + else + Write_Eol_Keep_Blanks; + end if; end if; end Output_Source_Line; |