From bef6f73c106ef8381cf10c52ef61a3d3cd309b96 Mon Sep 17 00:00:00 2001 From: charlet Date: Fri, 10 Sep 2010 15:57:51 +0000 Subject: 2010-09-10 Vincent Celier * projects.texi: Add documentation for package extensions Add some documentation for attributes Leading_Library_Options and Linker'Leading_Switches. 2010-09-10 Ed Schonberg * exp_util.adb (Expand_Subtype_From_Expression): When expansion is disabled, compute subtype for all string types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164195 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/exp_util.adb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gcc/ada/exp_util.adb') diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 6c14b02e40f..99ec49ad21c 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -1216,14 +1216,15 @@ package body Exp_Util is begin -- In general we cannot build the subtype if expansion is disabled, -- because internal entities may not have been defined. However, to - -- avoid some cascaded errors, we try to continue when the expression - -- is an array (or string), because it is safe to compute the bounds. - -- It is in fact required to do so even in a generic context, because - -- there may be constants that depend on bounds of string literal. + -- avoid some cascaded errors, we try to continue when the expression is + -- an array (or string), because it is safe to compute the bounds. It is + -- in fact required to do so even in a generic context, because there + -- may be constants that depend on the bounds of a string literal, both + -- standard string types and more generally arrays of characters. if not Expander_Active and then (No (Etype (Exp)) - or else Base_Type (Etype (Exp)) /= Standard_String) + or else not Is_String_Type (Etype (Exp))) then return; end if; -- cgit v1.2.1