aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorViljar Indus <indus@adacore.com>2023-06-08 17:29:23 +0300
committerMarc Poulhiès <poulhies@adacore.com>2023-06-27 14:05:49 +0200
commitf404dd44078fdecf83b142831d6cc6f52f3a76b6 (patch)
treef79bcda87f2506a1436ee792e992bf06dc0525ac /gcc
parent765fc22ca5dbba94198e555ebcebb1944cf24731 (diff)
downloadgcc-f404dd44078fdecf83b142831d6cc6f52f3a76b6.zip
gcc-f404dd44078fdecf83b142831d6cc6f52f3a76b6.tar.gz
gcc-f404dd44078fdecf83b142831d6cc6f52f3a76b6.tar.bz2
ada: Update printing container aggregates for debugging
All N_Aggregate nodes were printed with parentheses "()". However the new container aggregates (homogeneous N_Aggregate nodes) should be printed with brackets "[]". gcc/ada/ * sprint.adb (Print_Node_Actual): Print homogeneous N_Aggregate nodes with brackets.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sprint.adb6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb
index dd4f420..f54d409 100644
--- a/gcc/ada/sprint.adb
+++ b/gcc/ada/sprint.adb
@@ -1084,7 +1084,8 @@ package body Sprint is
Write_Str_With_Col_Check_Sloc ("(null record)");
else
- Write_Str_With_Col_Check_Sloc ("(");
+ Write_Str_With_Col_Check_Sloc
+ (if Is_Homogeneous_Aggregate (Node) then "[" else "(");
if Present (Expressions (Node)) then
Sprint_Comma_List (Expressions (Node));
@@ -1120,7 +1121,8 @@ package body Sprint is
Indent_End;
end if;
- Write_Char (')');
+ Write_Char
+ (if Is_Homogeneous_Aggregate (Node) then ']' else ')');
end if;
when N_Allocator =>