From 3f5bb1b895b085c2b63af869b617c363b2cfcdb5 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 30 Jul 2009 11:26:39 +0200 Subject: [PATCH] [multiple changes] 2009-07-30 Ben Brosgol * gnat_ugn.texi: Correct minor texi glitch. 2009-07-30 Ed Schonberg * exp_util.adb (Expand_Subtype_From_Expr): If the type of the expression has an underlying representation that is an unchecked union, there is no subtype to build. From-SVN: r150253 --- gcc/ada/ChangeLog | 12 +++++++++++- gcc/ada/exp_util.adb | 6 ++++-- gcc/ada/gnat_ugn.texi | 6 +++--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b4b679e8c0b..35aa5423619 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,8 +1,18 @@ +2009-07-30 Ben Brosgol + + * gnat_ugn.texi: Correct minor texi glitch. + +2009-07-30 Ed Schonberg + + * exp_util.adb (Expand_Subtype_From_Expr): If the type of the + expression has an underlying representation that is an unchecked union, + there is no subtype to build. + 2009-07-30 Robert Dewar * a-teioed.adb, exp_disp.adb, s-linux-hppa.ads, s-linux.ads, s-tasini.adb, sem_ch13.adb, sem_ch3.adb, sem_ch3.ads, sem_ch6.adb, - sem_ch7.adb: Minor reformatting + sem_ch7.adb, adaint.c: Minor reformatting 2009-07-29 Javier Miranda diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 36b03387e38..cd05d75f1f3 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -1321,12 +1321,14 @@ package body Exp_Util is Rewrite (Subtype_Indic, New_Reference_To (T, Loc)); -- nothing needs to be done for private types with unknown discriminants - -- if the underlying type is not an unconstrained composite type. + -- if the underlying type is not an unconstrained composite type or it + -- is an unchecked union. elsif Is_Private_Type (Unc_Type) and then Has_Unknown_Discriminants (Unc_Type) and then (not Is_Composite_Type (Underlying_Type (Unc_Type)) - or else Is_Constrained (Underlying_Type (Unc_Type))) + or else Is_Constrained (Underlying_Type (Unc_Type)) + or else Is_Unchecked_Union (Underlying_Type (Unc_Type))) then null; diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index c1feece8654..d3ed3458203 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -24960,7 +24960,7 @@ GNAT always follows the Alpha implementation. For GNAT running on other than VMS systems, all the HP Ada 83 pragmas and attributes are recognized, although only a subset of them can sensibly be implemented. The description of pragmas in -@xref{Implementation Defined Pragmas,,, gnat_rm, GNAT Reference Manual} +@xref{Implementation Defined Pragmas,,, gnat_rm, GNAT Reference Manual}, indicates whether or not they are applicable to non-VMS systems. @menu @@ -25407,7 +25407,7 @@ pragma Extend_System (Aux_DEC); @noindent The pragma @code{Extend_System} is a configuration pragma that is most conveniently placed in the @file{gnat.adc} file. @xref{Pragma -Extend_System,,, gnat_rm, GNAT Reference Manual} for further details. +Extend_System,,, gnat_rm, GNAT Reference Manual}, for further details. HP Ada does not allow the recompilation of the package @code{SYSTEM}. Instead HP Ada provides several pragmas @@ -25438,7 +25438,7 @@ are virtually identical to those provided by the HP Ada 83 package @code{TO_ADDRESS} function for type @code{UNSIGNED_LONGWORD} is changed to @code{TO_ADDRESS_LONG}. -@xref{Address Clauses,,, gnat_rm, GNAT Reference Manual} for a +@xref{Address Clauses,,, gnat_rm, GNAT Reference Manual}, for a discussion of why this change was necessary. @noindent