+
+ Not_Null_Present := P_Null_Exclusion; -- Ada 2005 (AI-423)
+
+ -- Ada 2005 (AI-423): Formal object with an access definition
+
+ if Token = Tok_Access then
+
+ -- The access definition is still parsed and set even though
+ -- the compilation may not use the proper switch. This action
+ -- ensures the required local error recovery.
+
+ Set_Access_Definition (Decl_Node,
+ P_Access_Definition (Not_Null_Present));
+
+ if Ada_Version < Ada_05 then
+ Error_Msg_SP
+ ("access definition not allowed in formal object " &
+ "declaration");
+ Error_Msg_SP ("\unit must be compiled with -gnat05 switch");
+ end if;
+
+ -- Formal object with a subtype mark
+
+ else
+ Set_Null_Exclusion_Present (Decl_Node, Not_Null_Present);
+ Set_Subtype_Mark (Decl_Node, P_Subtype_Mark_Resync);
+ end if;
+