]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/ada/sem_ch13.adb
2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 8 Apr 2008 06:50:04 +0000 (06:50 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 8 Apr 2008 06:50:04 +0000 (06:50 +0000)
commit177675a789607830e5aad49463cdfb3bef275a7b
tree3eb987e31cbb9c471a969036173a7789787d3095
parent40a5a4cbaac65746f08f8e124aaa29844fc94dbb
2008-04-08  Hristian Kirtchev  <kirtchev@adacore.com>
    Ed Schonberg  <schonberg@adacore.com>
    Robert Dewar  <dewar@adacore.com>

* exp_ch2.adb: Minor reformatting.
(Expand_Entry_Index_Parameter): Set the type of the identifier.
(Expand_Entry_Reference): Add call to Expand_Protected_Component.
(Expand_Protected_Component): New routine.
(Expand_Protected_Private): Removed.
Add Sure parameter to Note_Possible_Modification calls

* sem_ch12.ads, sem_ch12.adb (Analyze_Subprogram_Instantiation): The
generated subprogram declaration must inherit the overriding indicator
from the instantiation node.
(Validate_Access_Type_Instance): If the designated type of the actual is
a limited view, use the available view in all cases, not only if the
type is an incomplete type.
(Instantiate_Object):  Actual is illegal if the formal is null-excluding
and the actual subtype does not exclude null.
(Process_Default): Handle properly abstract formal subprograms.
(Check_Formal_Package_Instance): Handle properly defaulted formal
subprograms in a partially parameterized formal package.
Add Sure parameter to Note_Possible_Modification calls
(Validate_Derived_Type_Instance): if the formal is non-limited, the
actual cannot be limited.
(Collect_Previous_Instances): Generate instance bodies for subprograms
as well.

* sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Small): Don't
try to set RM_Size.
Add Sure parameter to Note_Possible_Modification calls
(Analyze_At_Clause): Preserve Comes_From_Source on Rewrite call
(Analyze_Attribute_Definition_Clause, case Attribute_Address): Check for
constant overlaid by variable and issue warning.
Use new Is_Standard_Character_Type predicate
(Analyze_Record_Representation_Clause): Check that the specified
Last_Bit is not less than First_Bit - 1.
(Analyze_Attribute_Definition_Clause, case Address): Check for
self-referential address clause

* sem_ch5.ads, sem_ch5.adb (Diagnose_Non_Variable_Lhs): Rewrite the
detection mechanism when the lhs is a prival.
(Analyze_Assignment): Call Check_Unprotected_Access to detect
assignment of a pointer to protected data, to an object declared
outside of the protected object.
(Analyze_Loop_Statement): Check for unreachable code after loop
Add Sure parameter to Note_Possible_Modication calls
Protect analysis from previous syntax error such as a scope mismatch
or a missing begin.
(Analyze_Assignment_Statement): The assignment is illegal if the
left-hand is an interface.

* sem_res.adb (Resolve_Arithmetic_Op): For mod/rem check violation of
restriction No_Implicit_Conditionals
Add Sure parameter to Note_Possible_Modication calls
Use new Is_Standard_Character_Type predicate
(Make_Call_Into_Operator): Preserve Comes_From_Source when rewriting
call as operator. Fixes problems (e.g. validity checking) which
come from the result looking as though it does not come from source).
(Resolve_Call): Check case of name in named parameter if style checks
are enabled.
(Resolve_Call): Exclude calls to Current_Task as entry formal defaults
from the checking that such calls should not occur from an entry body.
(Resolve_Call): If the return type of an Inline_Always function
requires the secondary stack, create a transient scope for the call
if the body of the function is not available for inlining.
(Resolve_Actuals): Apply Ada2005 checks to view conversions of arrays
that are actuals for in-out formals.
(Try_Object_Operation): If prefix is a tagged protected object,retrieve
primitive operations from base type.
(Analyze_Selected_Component): If the context is a call to a protected
operation the parent may be an indexed component prior to expansion.
(Resolve_Actuals): If an actual is of a protected subtype, use its
base type to determine whether a conversion to the corresponding record
is needed.
(Resolve_Short_Circuit): Handle pragma Check

* sem_eval.adb: Minor code reorganization (usea Is_Constant_Object)
Use new Is_Standard_Character_Type predicate
(Eval_Relational_Op): Catch more cases of string comparison

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134027 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/exp_ch2.adb
gcc/ada/sem_ch12.adb
gcc/ada/sem_ch12.ads
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch5.adb
gcc/ada/sem_ch5.ads
gcc/ada/sem_eval.adb
gcc/ada/sem_res.adb