diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-04 14:58:47 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-04 14:58:47 +0000 |
commit | fa814356abcaab059cdffab069344e383ae45e71 (patch) | |
tree | eee69f9476365cf2db06be3df66d76e53f8c8b30 /gcc/ada/checks.adb | |
parent | 2fff57b3badae2bedac8308c57c6c0292f7f9879 (diff) | |
download | gcc-fa814356abcaab059cdffab069344e383ae45e71.tar.gz |
2004-10-04 Robert Dewar <dewar@gnat.com>
* exp_ch3.adb (Needs_Simple_Initialization): Modular packed arrays no
longer need to be initialized to zero.
(Get_Simple_Init_Val): Modular packed arrays no longer need to be
initialized to zero.
* checks.adb (Expr_Known_Valid): Packed arrays are now always
considered valid, even if the representation is modular. That's correct
now that we no longer initialize packed modular arrays to zero.
* exp_dbug.ads: Clarify documentation on handling of PAD and JM
suffixes. These are now documented as the only cases in which the
debugger ignores outer records.
Previously, the spec allowed arbitrary suffixes for this purpose.
Change name of LJM to JM for packed array pad records
Create separate section on packed array handling, and add a whole new
set of comments to this section describing the situation with packed
modular types and justification requirements depending on endianness.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88500 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r-- | gcc/ada/checks.adb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 6f741011377..357d9f290ec 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -3724,12 +3724,16 @@ package body Checks is Typ : constant Entity_Id := Etype (Expr); begin - -- Non-scalar types are always consdered valid, since they never + -- Non-scalar types are always considered valid, since they never -- give rise to the issues of erroneous or bounded error behavior -- that are the concern. In formal reference manual terms the - -- notion of validity only applies to scalar types. + -- notion of validity only applies to scalar types. Note that + -- even when packed arrays are represented using modular types, + -- they are still arrays semantically, so they are also always + -- valid (in particular, the unused bits can be random rubbish + -- without affecting the validity of the array value). - if not Is_Scalar_Type (Typ) then + if not Is_Scalar_Type (Typ) or else Is_Packed_Array_Type (Typ) then return True; -- If no validity checking, then everything is considered valid |