From: Piotr Trojanek Date: Thu, 10 Dec 2020 23:42:22 +0000 (+0100) Subject: [Ada] Adjust List_Length description X-Git-Tag: basepoints/gcc-13~8103 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ba344f1ba6948ded21ba3bda4d0f7460eee2862b;p=thirdparty%2Fgcc.git [Ada] Adjust List_Length description gcc/ada/ * nlists.ads (List_Length): Adapt comment to match the behaviour. --- diff --git a/gcc/ada/nlists.ads b/gcc/ada/nlists.ads index 169c8e5bc4f3..c006131fc44a 100644 --- a/gcc/ada/nlists.ads +++ b/gcc/ada/nlists.ads @@ -146,9 +146,9 @@ package Nlists is -- No_List. (No_List is not considered to be the same as an empty list). function List_Length (List : List_Id) return Nat; - -- Returns number of items in the given list. It is an error to call - -- this function with No_List (No_List is not considered to be the same - -- as an empty list). + -- Returns number of items in the given list. If called on No_List it + -- returns 0, even though No_List is not considered to be the same as an + -- empty list. function Next (Node : Node_Or_Entity_Id) return Node_Or_Entity_Id; pragma Inline (Next);