diff options
author | Bob Duff <duff@adacore.com> | 2021-04-09 08:56:23 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-06-29 14:23:46 +0000 |
commit | b9ec951f4318f1ed8d8c8d5477eeb534ad0811ae (patch) | |
tree | 58fa06ddc61436c57a776eb3099bb86f7f000149 /gcc/ada/einfo.ads | |
parent | 0bc7cf47c1266f9ae510c70833b5691c693c769f (diff) | |
download | gcc-b9ec951f4318f1ed8d8c8d5477eeb534ad0811ae.zip gcc-b9ec951f4318f1ed8d8c8d5477eeb534ad0811ae.tar.gz gcc-b9ec951f4318f1ed8d8c8d5477eeb534ad0811ae.tar.bz2 |
[Ada] tech debt: clean up Component_Size
gcc/ada/
* einfo.ads (Component_Bit_Offset, Component_Size): Update
documentation: Repinfo is the package where these negative
values are documented.
* einfo-utils.adb (Known_Component_Size,
Known_Static_Component_Size, Unknown_Component_Size): Remove
calls to Implementation_Base_Type, because Component_Size is an
Impl_Base_Type_Only field (see Gen_Entities).
* sem_ch13.ads, sem_ch13.adb (Check_Size): Do not set Esize and
RM_Size. This is unnecessary in the case of Size. For
Component_Size, it is wrong, because we would be setting the
Esize and RM_Size of the component type.
Diffstat (limited to 'gcc/ada/einfo.ads')
-rw-r--r-- | gcc/ada/einfo.ads | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 4c5a2da..5298998 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -669,7 +669,7 @@ package Einfo is -- this field is always set. A negative value is used to represent -- a value which is not known at compile time, and must be computed -- at run-time (this happens if fields of a record have variable --- lengths). See package Layout for details of these values. +-- lengths). See package Repinfo for details of these values. -- -- Note: Component_Bit_Offset is redundant with respect to the fields -- Normalized_First_Bit and Normalized_Position, and could in principle @@ -691,8 +691,9 @@ package Einfo is -- by the front end in package Layout, or by the backend. A negative -- value is used to represent a value which is not known at compile -- time, and must be computed at run-time (this happens if the type --- of the component has a variable length size). See package Layout --- for details of these values. +-- of the component has a variable length size). See package Repinfo +-- for details of these values. Component_Size can also be negative in +-- an illegal program that says e.g. "for T'Component_Size use -8;". -- Component_Type [implementation base type only] -- Defined in array types and string types. References component type. |