Correction to previous change; Asserts had been moved to
before Buf was initialized.
gcc/ada/
* uname.adb (Get_Unit_Name_String): Move Asserts after
Buf is initialized.
Suffix : Boolean := True)
is
begin
- pragma Assert (Buf.Chars (1) /= '"');
- pragma Assert (Is_Body_Name (N) or else Is_Spec_Name (N));
-
Buf.Length := 0;
Append_Decoded (Buf, N);
+ pragma Assert (Buf.Chars (1) /= '"');
+ pragma Assert (Is_Body_Name (N) or else Is_Spec_Name (N));
-- Buf always ends with "%s" or "%b", which we either remove, or replace
-- with " (spec)" or " (body)". Set_Casing of Buf after checking for