This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Tested on x86-linux, committed on mainline. In the Ada RM for Ada 95 (RM B.3.1(49)) there is a statement that a call to Update with a string parameter is equivalent to the effect of the call Update(Item, Offset, To_C (Str), Check). But as pointed out in the AI-242 discussion (www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00242.TXT?rev=1.6), this is a clear error with the unintended consequence of truncating the string after the point of the update. AI-242 specifies the appropriate correction Update(Item, Offset, To_C (Str, Append_Nul => False), Check). Since this a correction of a clear error, it seems appropriate to apply the correction unconditionally, so that it applies in Ada 95 mode as well. It seems unlikely that any program would be relying on this bug. 2005-01-03 Robert Dewar <dewar@adacore.com> * i-cstrin.adb (Update): Do not append a null in form called with a String. This avoids unintended behavior.
Attachment:
difs.13
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |