]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Ada: Fix inaccurate documentation of Max_Tasks restriction
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 22 Feb 2026 10:44:34 +0000 (11:44 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Sun, 22 Feb 2026 10:46:25 +0000 (11:46 +0100)
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.

gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
gcc/ada/gnat_rm.texi

index 1f0aa030f2cd0899f05bdebdd63c69495b11bbbe..2945a12422691822e97e2220a9c3c64a60c21f62 100644 (file)
@@ -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
 -------------------
index a5fb7f0bb97edfb91addb252489b7b30f9653331..af3c1eadbd49338b6196041bacd726d388c18268 100644 (file)
@@ -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}