https://gcc.gnu.org/g:b0335aafee09853b5d545a1bfa086ab4f8daf36d

commit r16-7624-gb0335aafee09853b5d545a1bfa086ab4f8daf36d
Author: Eric Botcazou <[email protected]>
Date:   Sun Feb 22 11:44:34 2026 +0100

    Ada: Fix inaccurate documentation of Max_Tasks restriction
    
    The restriction is implementation defined and only enforced at compile
    time by GNAT, so Storage_Error is never raised at run time.
    
    gcc/ada
            PR ada/124192
            * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
            (Max_Tasks): Adjust description.
            * gnat_rm.texi: Regenerate.

Diff:
---
 .../gnat_rm/standard_and_implementation_defined_restrictions.rst | 9 +++++----
 gcc/ada/gnat_rm.texi                                             | 9 +++++----
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git 
a/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst 
b/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
index 1f0aa030f2cd..2945a1242269 100644
--- a/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
+++ b/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
@@ -95,11 +95,12 @@ Max_Tasks
 ---------
 .. index:: Max_Tasks
 
-[RM D.7] Specifies the maximum number of task that may be created, not
+[RM D.7] Specifies the maximum number of tasks that may be created, not
 counting the creation of the environment task.  Violations of this
-restriction with a value of zero are detected at compile
-time. Violations of this restriction with values other than zero cause
-Storage_Error to be raised.
+restriction with a value of zero are detected at compile time in all
+contexts.  Violations of this restriction with a value greater than
+zero are detected for library-level tasks at compile time, but are
+not detected for local tasks at all.
 
 No_Abort_Statements
 -------------------
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index a5fb7f0bb97e..af3c1eadbd49 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -13016,11 +13016,12 @@ corresponding bound is static.
 
 @geindex Max_Tasks
 
-[RM D.7] Specifies the maximum number of task that may be created, not
+[RM D.7] Specifies the maximum number of tasks that may be created, not
 counting the creation of the environment task.  Violations of this
-restriction with a value of zero are detected at compile
-time. Violations of this restriction with values other than zero cause
-Storage_Error to be raised.
+restriction with a value of zero are detected at compile time in all
+contexts.  Violations of this restriction with a value greater than
+zero are detected for library-level tasks at compile time, but are
+not detected for local tasks at all.
 
 @node 
No_Abort_Statements,No_Access_Parameter_Allocators,Max_Tasks,Partition-Wide 
Restrictions
 @anchor{gnat_rm/standard_and_implementation_defined_restrictions 
no-abort-statements}@anchor{1dd}

Reply via email to