aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-locale.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/a-locale.ads')
-rw-r--r--gcc/ada/a-locale.ads11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ada/a-locale.ads b/gcc/ada/a-locale.ads
index 629f367..132c883 100644
--- a/gcc/ada/a-locale.ads
+++ b/gcc/ada/a-locale.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2010, Free Software Foundation, Inc. --
+-- Copyright (C) 2010-2016, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
@@ -19,8 +19,13 @@ package Ada.Locales is
pragma Preelaborate (Locales);
pragma Remote_Types (Locales);
- type Language_Code is array (1 .. 3) of Character range 'a' .. 'z';
- type Country_Code is array (1 .. 2) of Character range 'A' .. 'Z';
+ type Language_Code is new String (1 .. 3)
+ with Dynamic_Predicate =>
+ (for all E of Language_Code => E in 'a' .. 'z');
+
+ type Country_Code is new String (1 .. 2)
+ with Dynamic_Predicate =>
+ (for all E of Country_Code => E in 'A' .. 'Z');
Language_Unknown : constant Language_Code := "und";
Country_Unknown : constant Country_Code := "ZZ";