aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2023-06-28 01:36:51 -0300
committerMarc Poulhiès <poulhies@adacore.com>2023-07-10 14:41:39 +0200
commit61736805341e4fabd1c5e0f46b15b459ad98179e (patch)
tree14cd7a1f8b132f1dbbb197107f520fe290f9a766
parent4a58185d67029f866577a551888cabf2ac71d9b8 (diff)
downloadgcc-61736805341e4fabd1c5e0f46b15b459ad98179e.zip
gcc-61736805341e4fabd1c5e0f46b15b459ad98179e.tar.gz
gcc-61736805341e4fabd1c5e0f46b15b459ad98179e.tar.bz2
ada: hardcfr: mark throw-expected functions
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.
-rw-r--r--gcc/ada/doc/gnat_rm/security_hardening_features.rst17
-rw-r--r--gcc/ada/gnat_rm.texi17
2 files changed, 18 insertions, 16 deletions
diff --git a/gcc/ada/doc/gnat_rm/security_hardening_features.rst b/gcc/ada/doc/gnat_rm/security_hardening_features.rst
index 1432859..cf8c8a2 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 817ba0b..988bb77 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