From 9ae497cb69e5a944e29225a402883ad359d5c031 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 9 Jul 2019 07:53:30 +0000 Subject: [PATCH] [Ada] Set Dynamic_Elaboration_Checks to True in CodePeer mode 2019-07-09 Arnaud Charlet gcc/ada/ * gnat1drv.adb (Adjust_Global_Switches): Set Dynamic_Elaboration_Checks to True in CodePeer mode. From-SVN: r273268 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gnat1drv.adb | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0fd03b728d9..1e109c2991d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-07-09 Arnaud Charlet + + * gnat1drv.adb (Adjust_Global_Switches): Set + Dynamic_Elaboration_Checks to True in CodePeer mode. + 2019-07-09 Yannick Moy * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 86d6be2c14f..f0f8de704cb 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -320,7 +320,12 @@ procedure Gnat1drv is Elaboration_Check => True, others => False); - Dynamic_Elaboration_Checks := False; + -- Need to enable dynamic elaboration checks to disable strict + -- static checking performed by gnatbind. We are at the same time + -- suppressing actual compile time elaboration checks to simplify + -- the generated code. + + Dynamic_Elaboration_Checks := True; -- Set STRICT mode for overflow checks if not set explicitly. This -- prevents suppressing of overflow checks by default, in code down -- 2.30.2