[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
Showing
gcc/testsuite/gnat.dg/fixed_delete.adb
0 → 100644
Please
register
or
sign in
to comment