]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] snames.ads-tmpl: add comment
authorBob Duff <duff@adacore.com>
Mon, 16 Dec 2019 17:27:17 +0000 (12:27 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 2 Jun 2020 08:58:12 +0000 (04:58 -0400)
2020-06-02  Bob Duff  <duff@adacore.com>

gcc/ada/

* snames.ads-tmpl: Add comments explaining that enumeration
types have to be kept in synch with subtypes of Name_Id.

gcc/ada/snames.ads-tmpl

index 112e2091c6e41836e005c373bf0c1312bfc4a3e2..be1999de896053d5d1cac34d695a110ee906ca50 100644 (file)
@@ -33,10 +33,15 @@ with Namet; use Namet;
 
 package Snames is
 
---  This package contains definitions of standard names (i.e. entries in the
---  Names table) that are used throughout the GNAT compiler. It also contains
---  the definitions of some enumeration types whose definitions are tied to the
---  order of these preset names.
+   --  This package contains definitions of standard names (i.e. entries in
+   --  the Names table) that are used throughout the GNAT compiler. It also
+   --  contains the definitions of some enumeration types whose definitions
+   --  are tied to the order of these preset names.
+
+   --  NOTE WELL: If you add names of attributes, the enumeration type
+   --  Attribute_Id must be kept in synch (same names in same order, with
+   --  some exceptions). See the body of Get_Attribute_Id for details. The
+   --  same is true of other enumeration types declared in this package.
 
    ------------------
    -- Preset Names --