[Ada] Minor: improve comments
2019-12-16 Bob Duff <duff@adacore.com> gcc/ada/ * errout.adb, errout.ads: Improve comments. From-SVN: r279440
This commit is contained in:
parent
9aaea2cc4b
commit
495cdc79fb
|
@ -1,3 +1,7 @@
|
|||
2019-12-16 Bob Duff <duff@adacore.com>
|
||||
|
||||
* errout.adb, errout.ads: Improve comments.
|
||||
|
||||
2019-12-16 Bob Duff <duff@adacore.com>
|
||||
|
||||
* sem_util.ads: Minor comment fix.
|
||||
|
|
|
@ -1716,9 +1716,12 @@ package body Errout is
|
|||
|
||||
function Is_Size_Too_Small_Message (S : String) return Boolean is
|
||||
Size_For : constant String := "size for";
|
||||
pragma Assert (Size_Too_Small_Message (1 .. Size_For'Last) = Size_For);
|
||||
-- Assert that Size_Too_Small_Message starts with Size_For
|
||||
begin
|
||||
return S'Length >= Size_For'Length
|
||||
and then S (S'First .. S'First + Size_For'Length - 1) = Size_For;
|
||||
-- True if S starts with Size_For
|
||||
end Is_Size_Too_Small_Message;
|
||||
|
||||
-----------------
|
||||
|
|
|
@ -957,8 +957,9 @@ package Errout is
|
|||
function Is_Size_Too_Small_Message (S : String) return Boolean;
|
||||
Size_Too_Small_Message : constant String :=
|
||||
"size for& too small, minimum allowed is ^";
|
||||
-- This message is explicitly tested in Special_Msg_Delete in the package
|
||||
-- body, which is somewhat questionable, but at least by using a constant
|
||||
-- we are obeying the DRY principle.
|
||||
-- This message is printed in Freeze and Sem_Ch13. We also test for it in
|
||||
-- the body of this package (see Special_Msg_Delete) ???which is somewhat
|
||||
-- questionable. The Is_Size_Too_Small_Message function tests for it by
|
||||
-- testing a prefix. The function and constant should be kept in synch.
|
||||
|
||||
end Errout;
|
||||
|
|
Loading…
Reference in New Issue