The compiler triggers warnings on generated protected procedures
if the procedure does not have an explicit spec. Instead check
if the body was created for a protected procedure if the spec
is not present.
gcc/ada/
* sem_ch6.adb (Analyze_Subprogram_Body_Helper):
If the spec is not present for a subprogram body then
check if the body definiton was created for a protected
procedure.
-- Skip the check for subprograms generated for protected subprograms
-- because it is also done for the protected subprograms themselves.
- elsif Present (Spec_Id)
- and then Present (Protected_Subprogram (Spec_Id))
+ elsif (Present (Spec_Id)
+ and then Present (Protected_Subprogram (Spec_Id)))
+ or else
+ (Acts_As_Spec (N)
+ and then Present (Protected_Subprogram (Body_Id)))
then
null;