diff mbox series

[Ada] Suppress spurious CodePeer check on generic actual subprogram

Message ID 20220106171254.GA2921466@adacore.com
State New
Headers show
Series [Ada] Suppress spurious CodePeer check on generic actual subprogram | expand

Commit Message

Pierre-Marie de Rodat Jan. 6, 2022, 5:12 p.m. UTC
Procedure Destroy is intentionally doing nothing and needs an IN OUT
parameter, because to match the profile of a generic formal subprogram.

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

gcc/ada/

	* treepr.adb (Destroy): Prevent spurious check from CodePeer.
diff mbox series

Patch

diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb
--- a/gcc/ada/treepr.adb
+++ b/gcc/ada/treepr.adb
@@ -84,6 +84,8 @@  package body Treepr is
    --  Simple Hash function for Node_Ids, List_Ids and Elist_Ids
 
    procedure Destroy (Value : in out Nat) is null;
+   pragma Annotate (CodePeer, False_Positive, "unassigned parameter",
+                    "in out parameter is required to instantiate generic");
    --  Dummy routine for destroing hashed values
 
    package Serial_Numbers is new Dynamic_Hash_Tables