]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Don't pretty-print DEL within expression images
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 30 Jan 2023 10:28:55 +0000 (11:28 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 22 May 2023 08:44:07 +0000 (10:44 +0200)
When printing expression images, e.g. for GNATprove counterexamples,
it seems better to print DEL not directly but with its numeric code.

gcc/ada/

* pprint.adb (Expr_Name): Exclude DEL from printable range.

gcc/ada/pprint.adb

index 8cc92445080240d753593a81d1b8c06df6be997f..526b70f7996227339796e341a13a5c8c9d077204 100644 (file)
@@ -195,7 +195,7 @@ package body Pprint is
                declare
                   Char : constant Int := UI_To_Int (Char_Literal_Value (Expr));
                begin
-                  if Char in 32 .. 127 then
+                  if Char in 32 .. 126 then
                      return "'" & Character'Val (Char) & "'";
                   else
                      UI_Image (Char_Literal_Value (Expr));