From: Justin Squirek <[email protected]>
Incremental improvement/clean up.
gcc/ada/
* sem_warn.adb (Within_Postcondition): Add/modify comments to
document various cases.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_warn.adb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index 8317b449021..54d8920a943 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -1973,6 +1973,8 @@ package body Sem_Warn is
begin
Nod := Parent (N);
while Present (Nod) loop
+ -- General contract / predicate related pragma
+
if Nkind (Nod) = N_Pragma
and then
Pragma_Name_Unmapped (Nod)
@@ -1992,6 +1994,8 @@ package body Sem_Warn is
then
return True;
+ -- Deal with special 'Ensures' Test_Case component
+
elsif Present (Parent (Nod)) then
P := Parent (Nod);
--
2.43.2