This is the mail archive of the 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]

Re: [Ada] Implement AI 242

I assume this patch is the cause of the new cxb3012 "failure" (on x86
and x86_64). I see no update to this test on the ACATS mod list
do you know if one has been approved or is planned?

Some part of the current test code is explicitely testing the old

    -- Note: In each of the cases below, the String parameter Str is
    --       treated as if it were nul terminated, which means that the
    --       char_array pointed to by TC_chars_ptr will be "shortened"
    --       so that it ends after the last character of the Str
    --       parameter.


,.,. CXB3012 ACATS 2.5 05-01-03 22:29:29
---- CXB3012 Check that both versions of Procedure Update produce
                correct results.
   * CXB3012 Incorrect result from Procedure Update - 5.
   * CXB3012 Incorrect result from Procedure Update - 6.
   * CXB3012 Incorrect result from Procedure Update - 7.
   * CXB3012 Incorrect result from Procedure Update - 8.
**** CXB3012 FAILED ****************************.

On Mon, 2005-01-03 at 17:10 +0100, Arnaud Charlet wrote:
> 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 (,
> 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  <>
> 	* i-cstrin.adb (Update): Do not append a null in form called with a
> 	String. This avoids unintended behavior.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]