diff options
author | Yannick Moy <moy@adacore.com> | 2018-12-11 11:10:12 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-12-11 11:10:12 +0000 |
commit | 0b8ff545ed09781fdbe20f1a6b9388db9b912a3c (patch) | |
tree | 4372a99ed7ae99461a235a89e3437887d70aaa43 | |
parent | 5fc26697366abd160c4e755b6fe25c778ac97784 (diff) | |
download | gcc-0b8ff545ed09781fdbe20f1a6b9388db9b912a3c.zip gcc-0b8ff545ed09781fdbe20f1a6b9388db9b912a3c.tar.gz gcc-0b8ff545ed09781fdbe20f1a6b9388db9b912a3c.tar.bz2 |
[Ada] Support access types in GNATprove
SPARK RM has been updated to support access types in SPARK. Part of this
support is that now SPARK RM 3.1 lists access types as having full
default initialization. Now updated.
There is no impact on compilation.
2018-12-11 Yannick Moy <moy@adacore.com>
gcc/ada/
* sem_util.adb (Has_Full_Default_Initialization): Consider
access types as having full default initialization.
From-SVN: r266990
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 003bea4..4713510 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2018-12-11 Yannick Moy <moy@adacore.com> + * sem_util.adb (Has_Full_Default_Initialization): Consider + access types as having full default initialization. + +2018-12-11 Yannick Moy <moy@adacore.com> + * gnat1drv.adb (Gnat1drv): Issue specific error message in GNATprove mode when multiple file names on the command line. * osint.adb, osint.ads (Dump_Command_Line_Source_File_Names): diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index cf13c24..c5a1944 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -10880,6 +10880,11 @@ package body Sem_Util is if Is_Scalar_Type (Typ) then return Has_Default_Aspect (Typ); + -- An access type is fully default initialized by default + + elsif Is_Access_Type (Typ) then + return True; + -- An array type is fully default initialized if its element type is -- scalar and the array type carries aspect Default_Component_Value or -- the element type is fully default initialized. |