--  B2029: a function with Side_Effects is called only as the whole value of an assignment or
--  of an object's declaration.
procedure Main is
   Count : Integer := 0;
   function Next return Integer with Side_Effects is
   begin
      Count := Count + 1;
      return Count;
   end Next;
   X : Integer;
begin
   X := Next + 1;
end Main;
