comp.lang.ada
 help / color / mirror / Atom feed
* Wrong GNAT warning. How to suppress it?
@ 2017-11-25 18:03 Victor Porton
  2017-11-25 18:09 ` Pascal Obry
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Victor Porton @ 2017-11-25 18:03 UTC (permalink / raw)


How to eliminate the GNAT warning in the below program?

$ gcc-7 -c main.adb
main.adb:13:05: warning: "return" statement missing following this statement
main.adb:13:05: warning: Program_Error may be raised at run time


procedure Main is

  procedure My_Raise is
  begin
    raise Constraint_Error;
  end;

  function F (I: Integer) return Integer is
  begin
    if I = 0 then
      return 1;
    end if;
    My_Raise;
  end;

begin
  null;
end;

-- 
Victor Porton - http://portonvictor.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-26 19:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-25 18:03 Wrong GNAT warning. How to suppress it? Victor Porton
2017-11-25 18:09 ` Pascal Obry
2017-11-25 18:27 ` Victor Porton
2017-11-25 19:03   ` Pascal Obry
2017-11-26 19:31 ` Robert Eachus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox