aboutsummaryrefslogtreecommitdiff
path: root/gcc/df.h
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2018-06-11 09:19:12 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-06-11 09:19:12 +0000
commit6534852011f3e72090c690ffc53b990feb709b9f (patch)
tree96875b19e41449a13338b35fcc0a99f1d4ad13b2 /gcc/df.h
parent90265b93430c82d817deae512208a76f5241ea1c (diff)
downloadgcc-6534852011f3e72090c690ffc53b990feb709b9f.zip
gcc-6534852011f3e72090c690ffc53b990feb709b9f.tar.gz
gcc-6534852011f3e72090c690ffc53b990feb709b9f.tar.bz2
[Ada] Dangling cursor checks in Element function
In Ada.Containers.Ordered_Maps, if a dangling cursor is passed to the Element function, execution is erroneous. Therefore, the compiler is not obligated to detect this error. However, this patch inserts code that will detect this error in some cases, and raise Program_Error. The same applies to Ordered_Sets, Ordered_Multisets, Indefinite_Ordered_Maps, Indefinite_Ordered_Sets, and Indefinite_Ordered_Multisets. No test available for erroneous execution. 2018-06-11 Bob Duff <duff@adacore.com> gcc/ada/ * libgnat/a-ciorma.adb, libgnat/a-ciormu.adb, libgnat/a-ciorse.adb, libgnat/a-coorma.adb, libgnat/a-coormu.adb, libgnat/a-coorse.adb: (Element): Add code to detect dangling cursors in some cases. From-SVN: r261424
Diffstat (limited to 'gcc/df.h')
0 files changed, 0 insertions, 0 deletions