]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Turn diagnostic object from variable to constant
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 9 Jun 2025 14:11:48 +0000 (16:11 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 3 Jul 2025 08:16:25 +0000 (10:16 +0200)
Diagnostic entries are not supposed to be modified while compiling the code.
Code cleanup; behavior is unaffected.

gcc/ada/ChangeLog:

* errid.ads (Diagnostic_Entries): Now a constant.

gcc/ada/errid.ads

index 56516d028bc1fe5b03f2e105b435a4448a4a2422..acabc3b1dfe8e7a5fc783d58731e798df154e72e 100644 (file)
@@ -76,7 +76,7 @@ package Errid is
    --    - Optionally additional information
    --    TODO: the mandatory fields for the documentation file could be changed
 
-   Diagnostic_Entries : Diagnostics_Registry_Type :=
+   Diagnostic_Entries : constant Diagnostics_Registry_Type :=
      (No_Diagnostic_Id => <>,
       GNAT0001         =>
         (Status        => Active,