aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-17 12:10:21 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-17 12:10:21 +0200
commitcac5a8014c2418c21917fef679a4243d97fce6b7 (patch)
tree53836e3dda60a91434c92ae14679560483c914b7 /gcc/ada
parent03f050b6b4f0b051bbd9ddf7061b5002808ed052 (diff)
downloadgcc-cac5a8014c2418c21917fef679a4243d97fce6b7.zip
gcc-cac5a8014c2418c21917fef679a4243d97fce6b7.tar.gz
gcc-cac5a8014c2418c21917fef679a4243d97fce6b7.tar.bz2
[multiple changes]
2009-04-17 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_Allocator_Expression): Apply constraint check to aggregate, using context imposed by subtype mark in allocator. 2009-04-17 Pascal Obry <obry@adacore.com> * gnat_rm.texi: Document GNAT_CODE_PAGE environment variable From-SVN: r146238
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/exp_ch4.adb5
-rw-r--r--gcc/ada/gnat_rm.texi16
3 files changed, 27 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index df057e5..0957668 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,12 @@
+2009-04-17 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_ch4.adb (Expand_Allocator_Expression): Apply constraint check to
+ aggregate, using context imposed by subtype mark in allocator.
+
+2009-04-17 Pascal Obry <obry@adacore.com>
+
+ * gnat_rm.texi: Document GNAT_CODE_PAGE environment variable
+
2009-04-17 Nicolas Roche <roche@adacore.com>
* initialize.c (__gnat_initialize): remove MAX_PATH limitation on each
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 874350b..5640e76 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -3449,8 +3449,13 @@ package body Exp_Ch4 is
end if;
-- Handle case of qualified expression (other than optimization above)
+ -- First apply constraint checks, because the bounds or discriminants
+ -- in the aggregate might not match the subtype mark in the allocator.
if Nkind (Expression (N)) = N_Qualified_Expression then
+ Apply_Constraint_Check
+ (Expression (Expression (N)), Etype (Expression (N)));
+
Expand_Allocator_Expression (N);
return;
end if;
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 9ce6255..322e6fe 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -13097,9 +13097,19 @@ string, the filename must be a standard 8bits string.
@end itemize
In the absence of a @samp{encoding=@var{xxx}} form parameter, the
-value UTF-8 is used. This encoding form parameter is only supported on
-the Windows platform. On the other Operating Systems the runtime is
-supporting UTF-8 natively.
+encoding is controlled by the @samp{GNAT_CODE_PAGE} environment
+variable. And if not set @samp{utf8} is assumed.
+
+@table @samp
+@item CP_ACP
+The current system Windows ANSI code page.
+@item CP_UTF8
+UTF-8 encoding
+@end table
+
+This encoding form parameter is only supported on the Windows
+platform. On the other Operating Systems the run-time is supporting
+UTF-8 natively.
@node Open Modes
@section Open Modes