diff mbox series

[Ada] Use function and not procedure UI_Image in pretty-printing

Message ID 20210504095223.GA90568@adacore.com
State New
Headers show
Series [Ada] Use function and not procedure UI_Image in pretty-printing | expand

Commit Message

Pierre-Marie de Rodat May 4, 2021, 9:52 a.m. UTC
Code cleanup; semantics is unaffected. The code for pretty-printing
integer, real and string literals now looks the same.

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

gcc/ada/

	* pprint.adb (Expr_Name): Simplify with functional variant of
	UI_Image.
diff mbox series

Patch

diff --git a/gcc/ada/pprint.adb b/gcc/ada/pprint.adb
--- a/gcc/ada/pprint.adb
+++ b/gcc/ada/pprint.adb
@@ -226,8 +226,7 @@  package body Pprint is
                end;
 
             when N_Integer_Literal =>
-               UI_Image (Intval (Expr));
-               return UI_Image_Buffer (1 .. UI_Image_Length);
+               return UI_Image (Intval (Expr));
 
             when N_Real_Literal =>
                return Real_Image (Realval (Expr));