diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-25 09:34:02 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-25 09:34:02 +0000 |
commit | 426bd7d68dd3b474a7d309c94e71ececa16d8bff (patch) | |
tree | e33ff61b64fe2dc5c8b03a655de538b8f1d30368 /gcc/ada/sem_ch12.adb | |
parent | 77378d518eb62788e2f759abb1a87a66dfafabaf (diff) | |
download | gcc-426bd7d68dd3b474a7d309c94e71ececa16d8bff.tar.gz |
2009-06-25 Vincent Celier <celier@adacore.com>
* vms_data.ads: Minor comment change
2009-06-25 Gary Dismukes <dismukes@adacore.com>
* exp_ch5.adb (Expand_N_Extended_Return_Statement): Don't build an
assignment statement to targeting a caller-provided object when the
result type is an interface type.
* exp_ch6.adb (Expand_Call): Remove redundant test of
Is_Limited_Interface (Is_Inherently_Limited is sufficient).
(Is_Build_In_Place_Function): Remove test for Is_Limited_Interface.
* sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Add type in call
to OK_For_Limited_Init.
* sem_aux.adb (Is_Inherently_Limited_Type): Revise limited type
condition so that True is returned for all limited interfaces, not
just synchronized ones. Ignore components of an interface type when
checking for limited components (such a component can be a parent
component).
* sem_ch3.ads (OK_For_Limited_Init_In_05): Add type parameter.
(OK_For_Limited_Init): Add type parameter.
* sem_ch3.adb (Check_Initialization): Add type in call to
OK_For_Limited_Init.
(OK_For_Limited_Init): Add new type param in call to
OK_For_Limited_Init_In_05.
(OK_For_Limited_Init_In_05): Permit arbitrary expressions of a
nonlimited type when the context type is a limited interface. Add type
on recursive calls.
* sem_ch4.adb (Analyze_Allocator): Add type in call to
OK_For_Limited_Init.
* sem_ch6.adb (Check_Limited_Return): Add type in call to
OK_For_Limited_Init.
* sem_ch12.adb (Analyze_Formal_Object_Declaration): Add type in call to
OK_For_Limited_Init.
(Instantiate_Object): Add type in call to OK_For_Limited_Init.
* sem_type.adb (Interface_Present_In_Ancestor): In the case of a
class-wide interface, get the base type before applying Etype, in order
to account for class-wide subtypes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148938 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r-- | gcc/ada/sem_ch12.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index f7d5a1a6156..9afdb0a5a48 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -1884,7 +1884,7 @@ package body Sem_Ch12 is if Present (E) then Preanalyze_Spec_Expression (E, T); - if Is_Limited_Type (T) and then not OK_For_Limited_Init (E) then + if Is_Limited_Type (T) and then not OK_For_Limited_Init (T, E) then Error_Msg_N ("initialization not allowed for limited types", E); Explain_Limited_Type (T, E); @@ -8434,7 +8434,7 @@ package body Sem_Ch12 is end if; if Is_Limited_Type (Typ) - and then not OK_For_Limited_Init (Actual) + and then not OK_For_Limited_Init (Typ, Actual) then Error_Msg_N ("initialization not allowed for limited types", Actual); |