aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/trans.c
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2019-07-08 08:13:25 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-08 08:13:25 +0000
commit4962dc441d317b6f28ab4ee3bf6b0d83f7c61837 (patch)
treefdc72c0911cbbc2fbfd602d3fa11004cb5af1854 /gcc/ada/gcc-interface/trans.c
parent4a0e6ac18f731f41f7ddfa05c370186cd32bef52 (diff)
downloadgcc-4962dc441d317b6f28ab4ee3bf6b0d83f7c61837.zip
gcc-4962dc441d317b6f28ab4ee3bf6b0d83f7c61837.tar.gz
gcc-4962dc441d317b6f28ab4ee3bf6b0d83f7c61837.tar.bz2
[Ada] Semantics of Delete for fixed strings
This patch corrects a bug in the implementation of Delete in an unusual boundary case: the RM describes the semantics of Delete as equivalent to that of Replace_String with a null argument. As a result, deleting a null string that starts past the end of its argument is a noop and must not raise Index_Error. 2019-07-08 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * libgnat/a-strfix.adb (Delete): The RM describes the semantics of Delete as equivalent to that of Replace_String with a null argument. As a result, deleting a null string that starts past the end of its argument is a noop and must not raise Index_Error. gcc/testsuite/ * gnat.dg/fixed_delete.adb: New testcase. From-SVN: r273205
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
0 files changed, 0 insertions, 0 deletions