aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/einfo.ads
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2023-06-16 09:16:19 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-07-28 09:28:13 +0200
commit02cda19cc998905dc2319407d7e49a2d48ec9af2 (patch)
treec1f2b857def65cf585b2332fc8d24b0e612e2767 /gcc/ada/einfo.ads
parentcb3bed6018acae828f7a4828678c017c95f695f4 (diff)
downloadgcc-02cda19cc998905dc2319407d7e49a2d48ec9af2.zip
gcc-02cda19cc998905dc2319407d7e49a2d48ec9af2.tar.gz
gcc-02cda19cc998905dc2319407d7e49a2d48ec9af2.tar.bz2
ada: Allow calls to Number_Formals when no formals are present
It is much simpler and safer for the routine Number_Formals to accept subprogram entities that have no formals. gcc/ada/ * einfo-utils.adb (Number_Formals): Change types in body. * einfo-utils.ads (Number_Formals): Change type in spec. * einfo.ads (Number_Formals): Change type in comment. * sem_ch13.adb (Is_Property_Function): Fix style in a caller of Number_Formals that was likely to crash because of missing guards.
Diffstat (limited to 'gcc/ada/einfo.ads')
-rw-r--r--gcc/ada/einfo.ads2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
index b356b76..d7690d9 100644
--- a/gcc/ada/einfo.ads
+++ b/gcc/ada/einfo.ads
@@ -3832,7 +3832,7 @@ package Einfo is
-- Number_Formals (synthesized)
-- Applies to subprograms and subprogram types. Yields the number of
--- formals as a value of type Pos.
+-- formals as a value of type Nat.
-- Object_Size_Clause (synthesized)
-- Applies to entities for types and subtypes. If an object size clause