public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] In CodePeer mode, use regular-exception handling
@ 2021-05-06  7:58 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-05-06  7:58 UTC (permalink / raw)
  To: gcc-patches; +Cc: Boris Yakobowski

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

After a change done for GNATProve in 2016, CodePeer_Mode was not using
the regular exception mechanism. This resulted in imprecise control-flow
graphs in some cases. Revert that change for CodePeer. And, since for
GNATprove_Mode Operating_Mode is never Generate_Code, we can simplify
the code a bit.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* gnat1drv.adb (Adjust_Global_Switches): Simplify logic.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 754 bytes --]

diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -633,13 +633,9 @@ procedure Gnat1drv is
       end if;
 
       --  Set and check exception mechanism. This is only meaningful when
-      --  compiling, and in particular not meaningful for special modes used
-      --  for program analysis rather than compilation: CodePeer mode and
-      --  GNATprove mode.
+      --  generating code.
 
-      if Operating_Mode = Generate_Code
-        and then not (CodePeer_Mode or GNATprove_Mode)
-      then
+      if Operating_Mode = Generate_Code then
          case Targparm.Frontend_Exceptions_On_Target is
             when True =>
                case Targparm.ZCX_By_Default_On_Target is



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-06  7:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06  7:58 [Ada] In CodePeer mode, use regular-exception handling Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).