]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Implement Ada 2022 iterated assignment
authorTom Tromey <tromey@adacore.com>
Tue, 5 Mar 2024 14:59:55 +0000 (07:59 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 2 Apr 2024 17:24:27 +0000 (11:24 -0600)
commit542ea7fe46deb713268364fa7b1a3333360e1044
treedd60ed83af06b59536e6bef47e61f7dfedbdb1cc
parentd9d782dd8b6c3665c28f6b610175a0756a7805a4
Implement Ada 2022 iterated assignment

Ada 2022 includes iterated assignment for array initialization.  This
patch implements a subset of this for gdb.  In particular, only arrays
with integer index types really work -- currently there's no decent
way to get the index type in EVAL_AVOID_SIDE_EFFECTS mode during
parsing.  Fixing this probably requires the Ada parser to take a
somewhat more sophisticated approach to type resolution; and while
this would help fix another bug in this area, this patch is already
useful without it.
gdb/ada-exp.h
gdb/ada-exp.y
gdb/ada-lang.c
gdb/ada-lex.l
gdb/testsuite/gdb.ada/iterated-assign.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/iterated-assign/main.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/iterated-assign/pck.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/iterated-assign/pck.ads [new file with mode: 0644]