diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2023-03-23 14:35:57 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-26 09:29:17 +0200 |
commit | 1ad8da08d62f5e3293a8b2506b1397009c483630 (patch) | |
tree | 5d7d5fa4613b5a853e989c2d955f1b24d1bfc54d | |
parent | 593e08bd1ed37b588332fc6953dd94c1dbf5db51 (diff) | |
download | gcc-1ad8da08d62f5e3293a8b2506b1397009c483630.zip gcc-1ad8da08d62f5e3293a8b2506b1397009c483630.tar.gz gcc-1ad8da08d62f5e3293a8b2506b1397009c483630.tar.bz2 |
ada: Reorder components in Ada.Containers.Restricted_Doubly_Linked_Lists
An instantiation of the package compiled with -gnatw.q yields:
warning: in instantiation at a-crdlli.ads:317 [-gnatw.q]
warning: record layout may cause performance issues [-gnatw.q]
warning: in instantiation at a-crdlli.ads:317 [-gnatw.q]
warning:
component "Nodes" whose length depends on a discriminant [-gnatw.q]
warning: in instantiation at a-crdlli.ads:317 [-gnatw.q]
warning: comes too early and was moved down [-gnatw.q]
gcc/ada/
* libgnat/a-crdlli.ads (List): Move Nodes component to the end.
-rw-r--r-- | gcc/ada/libgnat/a-crdlli.ads | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/libgnat/a-crdlli.ads b/gcc/ada/libgnat/a-crdlli.ads index d9c4517..fa4fe15 100644 --- a/gcc/ada/libgnat/a-crdlli.ads +++ b/gcc/ada/libgnat/a-crdlli.ads @@ -314,11 +314,11 @@ private type Node_Array is array (Count_Type range <>) of Node_Type; type List (Capacity : Count_Type) is tagged limited record - Nodes : Node_Array (1 .. Capacity); Free : Count_Type'Base := -1; First : Count_Type := 0; Last : Count_Type := 0; Length : Count_Type := 0; + Nodes : Node_Array (1 .. Capacity); end record; type List_Access is access all List; |