Add comment to explain why we have an error and not just a warning.

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

gcc/ada/

        * sem_ch6.adb (Check_Missing_Return): Add reference to an RM rule.
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -3568,6 +3568,10 @@ package body Sem_Ch6 is
                Id := Body_Id;
             end if;
 
+            --  A function body shall contain at least one return statement
+            --  that applies to the function body, unless the function contains
+            --  code_statements; RM 6.5(5).
+
             if Return_Present (Id) then
                Check_Returns (HSS, 'F', Missing_Ret);
 


Reply via email to