From: Bob Duff <[email protected]>
Fixes this bug: If -gnatw.o is specified, it is ignored unless
-gnatwm is also specified (either directly, or as part of a
catch-all switch like -gnatwa).
gcc/ada/ChangeLog:
* sem_warn.adb (Warn_On_Useless_Assignments):
Enable Warn_On_Useless_Assignment in the case of
Warn_On_All_Unread_Out_Parameters.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_warn.adb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index 74f9fe304df..32eee3370e2 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -4743,7 +4743,7 @@ package body Sem_Warn is
Ent : Entity_Id;
begin
- if Warn_On_Modified_Unread
+ if (Warn_On_Modified_Unread or Warn_On_All_Unread_Out_Parameters)
and then In_Extended_Main_Source_Unit (E)
then
Ent := First_Entity (E);
--
2.43.0