OSDN Git Service

2007-04-06 Ed Schonberg <schonberg@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Apr 2007 09:26:07 +0000 (09:26 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Apr 2007 09:26:07 +0000 (09:26 +0000)
commitcd5febfeaa8aa6d52e5c4723fe487e5457279776
tree154541d2d737450d96a02e07854151f97d5c4dd5
parent5865514819db1b7b720f3b1da912b1758c39e2a0
2007-04-06  Ed Schonberg  <schonberg@adacore.com>
    Gary Dismukes  <dismukes@adacore.com>

* sem_ch12.adb (Check_Generic_Actuals): Use first subtype of actual
when capturing size information, instead of base type, which for a
formal array type will be the unconstrained type.
(Analyze_Formal_Object_Declaration): Add check for illegal default
expressions for a formal in object of a limited type.
(Instantiate_Object): Ditto.
(Check_Formal_Package_Instance): Skip entities that are formal objects,
because they were defaulted in the formal package and no check applies
to them.
(Check_Formal_Package_Instance): Extend conformance check to other
discrete types beyond Integer.
(Process_Default): Copy directly the unmatched formal. A generic copy
has already been performed in Analyze_Formal_Package.
(Analyze_Associations): If a formal subprogram has no match, check for
partial parametrization before looking for a default, to prevent
spurious errors.
(Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation): Do
not set the instantiation environment before analyzing the actuals.
Fixes regression on 8515-003 with implementation of AI-133.
Set_Instance_Env checks whether the generic unit is a predefined
unit, in which case the instance must be analyzed with the latest Ada
mode. This setting must take place after analysis of the actuals,
because the actuals must be analyzed and frozen in the Ada mode extant
outside of the current instantiation.
(Save_Env, Restore_Env): Preserve and restore the configuration
parameters so that predefined units can be compiled in the proper Ada
mode.
(Analyze_Formal_Object_Declaration,Analyze_Formal_Subprogram,
Instantiate_Type): Split Is_Abstract flag into Is_Abstract_Subprogram
and Is_Abstract_Type.
(Analyze_Formal_Package): For better error recovery, Add exception
handler to catch Instantion_Error, which can be raised in
Analyze_Associations

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123593 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/sem_ch12.adb