Skip to content
Snippets Groups Projects
Commit 79cc2a75 authored by Alexandre Oliva's avatar Alexandre Oliva Committed by Marc Poulhiès
Browse files

ada: Expose expected_throw attribute

Mark exception-raising subprograms with expected_throw attribute.

Document the use of the attribute in Control Flow Redundancy.

Enable marking subprograms as expected_throw with Machine_Attribute
pragmas.

gcc/ada/

	* libgnat/a-except.ads (Raise_Exception): Mark expected_throw.
	(Reraise_Occurrence): Likewise.
	(Raise_Exception_Always): Likewise.
	(Raise_From_Controlled_Operation): Likewise.
	(Reraise_Occurrence_Always): Likewise.
	(Reraise_Occurrence_No_Defer): Likewise.
	* libgnat/a-except.adb
	(Exception_Propagation.Propagate_Exception): Likewise.
	(Complete_And_Propagate_Occurrence): Likewise.
	(Raise_Exception_No_Defer): Likewise.
	(Raise_From_Signal_Handler): Likewise.
	(Raise_With_Msg): Likewise.
	(Raise_With_Location_And_Msg): Likewise.
	(Raise_Constraint_Error): Likewise.
	(Raise_Constraint_Error_Msg): Likewise.
	(Raise_Program_Error): Likewise.
	(Raise_Program_Error_Msg): Likewise.
	(Raise_Storage_Error): Likewise.
	(Raise_Storage_Error_Msg): Likewise.
	(Reraise, Rcheck_*): Likewise.
	* doc/gnat_rm/security_hardening_features.rst (Control Flow
	Hardening): Note the influence of expected_throw.
	* gnat_rm.texi: Regenerate.
	* gnat_ugn.texi: Regenerate.
	* gcc-interface/utils.cc (handle_expected_throw_attribute): New.
	(gnat_internal_attribute_table): Add expected_throw.
parent 22b13ca2
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment