Debian Codegraph @

gcc/testsuite/gnat.dg/specs/opt7_pkg.adb

raw
1 package body Opt7_Pkg is
2
3 type Constant_String_Access is access constant String;
4
5 type Enum_Name is array (Enum) of Constant_String_Access;
6
7 Enum_Name_Table : constant Enum_Name :=
8 (A => new String'("A"), B => new String'("B"));
9
10 function Image (E : Enum) return String is
11 begin
12 return Enum_Name_Table (E).all;
13 end Image;
14
15 end Opt7_Pkg;