diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-20 13:59:22 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-20 13:59:22 +0200 |
commit | 319c61611e9a5a95ed7e05134f85f22113bc3b23 (patch) | |
tree | d3fc257548e7fbf76f48d8050f8f28fe69976a00 /gcc/ada/sem_warn.adb | |
parent | d29f68cf55fd41c19f10d789af9f92469f00f2da (diff) | |
download | gcc-319c61611e9a5a95ed7e05134f85f22113bc3b23.zip gcc-319c61611e9a5a95ed7e05134f85f22113bc3b23.tar.gz gcc-319c61611e9a5a95ed7e05134f85f22113bc3b23.tar.bz2 |
[multiple changes]
2015-10-20 Yannick Moy <moy@adacore.com>
* sem_warn.adb (Is_OK_Fully_Initialized): Consider types with DIC as
fully default initialized.
* sem_ch6.adb: minor style fix in comment
2015-10-20 Ed Schonberg <schonberg@adacore.com>
* s-diflio.ads, s-diflio.adb (Image): New function for dimensioned
quantities, to produce a string that includes the dimension
synbol for the quantity, or the vector of dimensions in standard
notation.
* sem_dim.adb (Expand_Put_Call_With_Symbol): Process new function
Image, to include dimension information in the generated string,
identical to the string produced by the Put procedure on a string
for a dimensioned quantity.
From-SVN: r229053
Diffstat (limited to 'gcc/ada/sem_warn.adb')
-rw-r--r-- | gcc/ada/sem_warn.adb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb index 9140a08..3af69c9 100644 --- a/gcc/ada/sem_warn.adb +++ b/gcc/ada/sem_warn.adb @@ -1697,6 +1697,18 @@ package body Sem_Warn is begin if Is_Access_Type (Typ) and then Is_Dereferenced (N) then return False; + + -- If a type has Default_Initial_Condition set, or it inherits it, + -- DIC might be specified with a boolean value, meaning that the type + -- is considered to be fully default initialized (SPARK RM 3.1 and + -- SPARK RM 7.3.3). To avoid generating spurious warnings in this + -- case, consider all types with DIC as fully initialized. + + elsif Has_Default_Init_Cond (Typ) + or else Has_Inherited_Default_Init_Cond (Typ) + then + return True; + else return Is_Fully_Initialized_Type (Typ); end if; |