https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66437
Bug ID: 66437 Summary: False Positive warning "Variable is not modified in loop body" Product: gcc Version: 4.7.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: tod_04 at syncorsystems dot com Target Milestone: --- In Ada when calling a function in a while loop and the function takes a parameter of mode "in out" the warning is generated that the passed variable is not modified. Specifically given : while Next_Stone(Value) loop null; end loop; Where Next_Stone is declared as function Next_Stone (Value : in out Positive) return Boolean is Will generate the following two warnings warning: variable "Value" is not modified in loop body" warning : possible infinite loop I would suggest that the warning should not be issued when the parameter mode is "out" or "in out".