Non-modified IN OUT parameters are first collected and then filtered by
examining uses of their enclosing subprograms. In this filtering we
don't need to look again at properties of the formal parameters
themselves.
Cleanup related to improved detection of references to uninitialized
objects; semantics is unaffected.
gcc/ada/
* sem_warn.adb
(No_Warn_On_In_Out): For subprograms we can simply call
Warnings_Off.
(Output_Non_Modified_In_Out_Warnings): Remove repeated
suppression.
then
return True;
- -- Else test warnings off
+ -- Else test warnings off on the subprogram
- elsif Warnings_Off_Check_Spec (S) then
+ elsif Warnings_Off (S) then
return True;
-- All tests for suppressing warning failed
begin
-- Suppress warning in specific cases (see details in comments for
- -- No_Warn_On_In_Out), or if there is a pragma Unmodified.
+ -- No_Warn_On_In_Out).
- if Has_Pragma_Unmodified_Check_Spec (E1)
- or else No_Warn_On_In_Out (E1)
- then
+ if No_Warn_On_In_Out (E1) then
null;
-- Here we generate the warning