summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/warn3.adb
blob: 66cc79bdba0736d3bc29822a8d1d3406c75c0520 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--  { dg-do compile }
--  { dg-options "-gnatwu" }

with Ada.Command_Line; use Ada.Command_Line;
with Text_IO; use Text_IO;
procedure warn3 is
   type Weekdays is (Sun, Mon, Tue, Wed, Thu, Fri, Sat);
begin
   if Argument_Count > 0 then
      Put_Line
        (Argument (1) & " is weekday number"
         & Integer'Image
            (Weekdays'Pos (Weekdays'Value (Argument (1)))));
   end if;
end;