a-strfix.adb
20.9 KB
-
[Ada] Semantics of Delete for fixed strings · 4962dc44
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
Ed Schonberg committed