diff mbox series

[COMMITTED] ada: hardcfr: mark throw-expected functions

Message ID 20230710124349.2263234-1-poulhies@adacore.com
State New
Headers show
Series [COMMITTED] ada: hardcfr: mark throw-expected functions | expand

Commit Message

Marc Poulhiès July 10, 2023, 12:43 p.m. UTC
From: Alexandre Oliva <oliva@adacore.com>

Adjust documentation to reflect the introduction of
-fhardcfr-check-noreturn-calls=no-xthrow.

gcc/ada/

	* doc/gnat_rm/security_hardening_features.rst (Control Flow
	Redundancy): Add -fhardcfr-check-noreturn-calls=no-xthrow.
	* gnat_rm.texi: Regenerate.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 .../doc/gnat_rm/security_hardening_features.rst | 17 +++++++++--------
 gcc/ada/gnat_rm.texi                            | 17 +++++++++--------
 2 files changed, 18 insertions(+), 16 deletions(-)
diff mbox series

Patch

diff --git a/gcc/ada/doc/gnat_rm/security_hardening_features.rst b/gcc/ada/doc/gnat_rm/security_hardening_features.rst
index 14328598c33..cf8c8a2493d 100644
--- a/gcc/ada/doc/gnat_rm/security_hardening_features.rst
+++ b/gcc/ada/doc/gnat_rm/security_hardening_features.rst
@@ -493,17 +493,18 @@  gets modified as follows:
    end;
 
 
-Verification may also be performed before No_Return calls, whether
-only nothrow ones, with
-:switch:`-fhardcfr-check-noreturn-calls=nothrow`, or all of them, with
-:switch:`-fhardcfr-check-noreturn-calls=always`.  The default is
-:switch:`-fhardcfr-check-noreturn-calls=never` for this feature, that
-disables checking before No_Return calls.
+Verification may also be performed before No_Return calls, whether all
+of them, with :switch:`-fhardcfr-check-noreturn-calls=always`; all but
+internal subprograms involved in exception-raising or -reraising, with
+:switch:`-fhardcfr-check-noreturn-calls=no-xthrow` (default); only
+nothrow ones, with :switch:`-fhardcfr-check-noreturn-calls=nothrow`;
+or none, with :switch:`-fhardcfr-check-noreturn-calls=never`.
 
 When a No_Return call returns control to its caller through an
 exception, verification may have already been performed before the
-call, if :switch:`-fhardcfr-check-noreturn-calls=always` is in effect.
-The compiler arranges for already-checked No_Return calls without a
+call, if :switch:`-fhardcfr-check-noreturn-calls=always` or
+:switch:`-fhardcfr-check-noreturn-calls=no-xthrow` is in effect.  The
+compiler arranges for already-checked No_Return calls without a
 preexisting handler to bypass the implicitly-added cleanup handler and
 thus the redundant check, but a local exception or cleanup handler, if
 present, will modify the set of visited blocks, and checking will take
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 817ba0b9108..988bb779105 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -29634,17 +29634,18 @@  exception
 end;
 @end example
 
-Verification may also be performed before No_Return calls, whether
-only nothrow ones, with
-@code{-fhardcfr-check-noreturn-calls=nothrow}, or all of them, with
-@code{-fhardcfr-check-noreturn-calls=always}.  The default is
-@code{-fhardcfr-check-noreturn-calls=never} for this feature, that
-disables checking before No_Return calls.
+Verification may also be performed before No_Return calls, whether all
+of them, with @code{-fhardcfr-check-noreturn-calls=always}; all but
+internal subprograms involved in exception-raising or -reraising, with
+@code{-fhardcfr-check-noreturn-calls=no-xthrow} (default); only
+nothrow ones, with @code{-fhardcfr-check-noreturn-calls=nothrow};
+or none, with @code{-fhardcfr-check-noreturn-calls=never}.
 
 When a No_Return call returns control to its caller through an
 exception, verification may have already been performed before the
-call, if @code{-fhardcfr-check-noreturn-calls=always} is in effect.
-The compiler arranges for already-checked No_Return calls without a
+call, if @code{-fhardcfr-check-noreturn-calls=always} or
+@code{-fhardcfr-check-noreturn-calls=no-xthrow} is in effect.  The
+compiler arranges for already-checked No_Return calls without a
 preexisting handler to bypass the implicitly-added cleanup handler and
 thus the redundant check, but a local exception or cleanup handler, if
 present, will modify the set of visited blocks, and checking will take