aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_aux.adb
AgeCommit message (Collapse)AuthorFilesLines
2010-10-26[multiple changes]Arnaud Charlet1-1/+1
2010-10-26 Robert Dewar <dewar@adacore.com> * einfo.ads, einfo.adb (Is_Base_Type): New function, use it where appropriate. * exp_ch6.adb, exp_dbug.adb, exp_disp.adb, freeze.adb, lib-xref.adb, sem_aux.adb, sem_ch3.adb, sem_ch7.adb, sem_ch8.adb (Is_Base_Type): Use this new abstraction where appropriate. 2010-10-26 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb: Code clean up. 2010-10-26 Paul Hilfinger <hilfinger@adacore.com> * exp_dbug.ads: Document effect of 'pragma Unchecked_Union' on debugging data. 2010-10-26 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Note_Possible_Modification): If the target of an assignment is the bound variable in an iterator, the domain of iteration, i.e. array or container, is modified as well. 2010-10-26 Bob Duff <duff@adacore.com> * Make-generated.in: Make the relevant make targets depend on ceinfo.adb and csinfo.adb. * csinfo.adb, ceinfo.adb: Make sure it raises an exception on failure, so when called from xeinfo, the failure will be noticed. * sinfo.ads: Update comments to reflect the fact that xsinfo runs csinfo * xsinfo.adb, xeinfo.adb: Run ceinfo to check for errors. Close files. 2010-10-26 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb: Set properly parent field of operands of concatenation. 2010-10-26 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Check_Infinite_Recursion): A recursive call within a conditional expression or a case expression should not generate an infinite recursion warning. From-SVN: r165946
2010-10-22[multiple changes]Arnaud Charlet1-0/+19
2010-10-22 Robert Dewar <dewar@adacore.com> * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb (Is_Generic_Formal): Moved from Sem_Util to Sem_Aux. 2010-10-22 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop): New subprogram, implements new iterator forms over arrays and containers, in loops and quantified expressions. * exp_util.adb (Insert_Actions): include N_Iterator_Specification. * par-ch4.adb (P_Quantified_Expression): Handle iterator specifications. * par-ch5.adb (P_Iterator_Specification): New subprogram. Modify P_Iteration_Scheme to handle both loop forms. * sem.adb: Handle N_Iterator_Specification. * sem_ch5.adb, sem_ch5.ads (Analyze_Iterator_Specification): New subprogram. * sinfo.adb, sinfo.ads: New node N_Iterator_Specification. N_Iteration_Scheme can now include an Iterator_Specification. Ditto for N_Quantified_Expression. * snames.ads-tmpl: Add names Cursor, Element, Element_Type, No_Element, and Previous, to support iterators over predefined containers. * sprint.adb: Handle N_Iterator_Specification. From-SVN: r165811
2010-10-22checks.adb (Apply_Predicate_Check): Remove attempt at optimization when ↵Robert Dewar1-0/+40
subtype is the same... 2010-10-22 Robert Dewar <dewar@adacore.com> * checks.adb (Apply_Predicate_Check): Remove attempt at optimization when subtype is the same, caused legitimate checks to be missed. * exp_ch13.adb (Build_Predicate_Function): Use Nearest_Ancestor to get inheritance from right entity. * freeze.adb (Freeze_Entity): Use Nearest_Ancestor to freeze in the derived type case if the ancestor type has predicates. * sem_aux.ads, sem_aux.adb (Nearest_Ancestor): New function. * sem_prag.adb (Check_Enabled): Minor code reorganization. From-SVN: r165807
2010-10-12[multiple changes]Arnaud Charlet1-2/+1
2010-10-12 Thomas Quinot <quinot@adacore.com> * a-exetim.ads: Minor reformatting. * g-socket.ads (Port_Type): Better definition corresponding to the actual standard range. * exp_ch5.adb: Add comment. * sem_aux.adb: Minor reformatting. 2010-10-12 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Copy_Generic_Node): If node is a string literal, remove string_literal_subtype so that a new one can be constructed in the scope of the instance. From-SVN: r165357
2010-10-11[multiple changes]Arnaud Charlet1-6/+9
2010-10-11 Javier Miranda <miranda@adacore.com> * a-textio.adb: Move new implementation of Get_Line to a subunit. * a-tigeli.adb: New subunit containing the implementation of Get_Line. 2010-10-11 Ed Schonberg <schonberg@adacore.com> * sem_aux.adb: Code clean up. From-SVN: r165272
2010-10-11sem_ch3.adb, [...]: Minor reformattingRobert Dewar1-2/+3
2010-10-11 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, sem_aux.adb, sem_ch6.adb: Minor reformatting 2010-10-11 Robert Dewar <dewar@adacore.com> * einfo.adb, atree.h, atree.ads, atree.adb: Define seven new flags Flag248-Flag254. Define new field Field29. From-SVN: r165271
2010-10-08[multiple changes]Arnaud Charlet1-7/+6
2010-10-08 Ed Schonberg <schonberg@adacore.com> * sem_aux.adb: Cleanup Is_Immutably_Limited_Type. 2010-10-08 Robert Dewar <dewar@adacore.com> * exp_ch3.adb: Minor reformatting. * exp_ch5.adb: Add comment. From-SVN: r165177
2010-10-08[multiple changes]Arnaud Charlet1-15/+40
2010-10-08 Robert Dewar <dewar@adacore.com> * sem_prag.adb (Check_Duplicate_Pragma): Check for entity match * gcc-interface/Make-lang.in: Update dependencies. * einfo.ads: Minor reformatting. 2010-10-08 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, sem_aux.adb, sem_aux.ads, exp_ch4.adb, exp_ch6.adb, sem_ch6.adb, exp_aggr.adb, exp_ch3.adb: Change Is_Inherently_Limited_Type to Is_Immutably_Limited_Type to accord with new RM terminology. * sem_aux.adb (Is_Immutably_Limited_Type): A type that is a descendant of a formal limited private type is not immutably limited in a generic body. From-SVN: r165175
2010-06-22[multiple changes]Arnaud Charlet1-0/+16
2010-06-22 Robert Dewar <dewar@adacore.com> * s-rannum.adb: Minor reformatting. 2010-06-22 Javier Miranda <miranda@adacore.com> * sem_aux.adb, sem_aux.ads, sem_util.adb, sem_util.ads, sem_elim.adb, exp_cg.adb: Minor code reorganization: Move routine Ultimate_Alias from package Sem_Util to package Sem_Aux. 2010-06-22 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Make_Secondary_DT, Make_DT): Minor code cleanup: remove useless restriction on imported routines when building the dispatch tables. 2010-06-22 Robert Dewar <dewar@adacore.com> * cstand.adb (Create_Standard): Set Has_Pragma_Pack for standard string types. 2010-06-22 Javier Miranda <miranda@adacore.com> * sem_ch4.adb (Collect_Generic_Type_Ops): Protect code that handles generic subprogram declarations to ensure proper context. Add missing support for generic actuals. (Try_Primitive_Operation): Add missing support for concurrent types that have no Corresponding_Record_Type. Required to diagnose errors compiling generics or when compiling with no code generation (-gnatc). * sem_ch9.adb (Analyze_Protected_Type, Analyze_Task_Type): Do not build the corresponding record type. * sem_disp.ads, sem_disp.adb (Check_Dispatching_Operation): Complete documentation. Do minimum decoration when processing a primitive of a concurrent tagged type that covers interfaces. Required to diagnose errors in the Object.Operation notation compiling generics or under -gnatc. * exp_ch9.ads, exp_ch9.adb (Build_Corresponding_Record): Add missing propagation of attribute Interface_List to the corresponding record. (Expand_N_Task_Type_Declaration): Code cleanup. (Expand_N_Protected_Type_Declaration): Code cleanup. From-SVN: r161203
2010-06-22sem_res.adb, [...]: Minor reformatting.Robert Dewar1-4/+3
2010-06-22 Robert Dewar <dewar@adacore.com> * sem_res.adb, sem_aux.adb, errout.adb: Minor reformatting. From-SVN: r161169
2009-07-29frontend.adb (Frontend): Code cleanup.Javier Miranda1-33/+0
2009-07-29 Javier Miranda <miranda@adacore.com> * frontend.adb (Frontend): Code cleanup. * exp_atag.ads, exp_atag.adb (Build_Get_Predefined_Prim_Op_Address): Rewriten as a procedure because it a new out-mode parameters to keep up-to-date the controlling tag node in the caller. (Build_Get_Prim_Op_Address): Rewriten as a procedure because it has a new out-mode parameter to keep up-to-date the controlling tag node in the caller. * exp_ch7.adb, sem_ch5.adb, exp_util.adb, sem_util.adb, exp_ch4.adb, exp_ch6.adb, sem_ch4.adb, exp_ch3.adb: Add new dependency on new package Sem_SCIL. * sem_aux.ads, sem_aux.adb (First_Non_SCIL_Node): Removed. Routine available in new package Sem_SCIL. (Next_Non_SCIL_Node): Ditto. * exp_disp.adb (Adjust_SCIL_Node): Removed. Routine available in new package Sem_SCIL. (Expand_Dispatching_Call): Update call to modified Exp_Atags routines plus complete decoration of SCIL dispatching node. (Find_SCIL_Node): Removed. Routine available in new package Sem_SCIL. * exp_disp.ads (Adjust_SCIL_Node): Removed. Routine available in new package Sem_SCIL. (Find_SCIL_Node): Removed. Routine available in new package Sem_SCIL. * exp_ch3.adb (Build_Init_Procedure): Fix comment. * sem_scil.ads, sem_scil.adb: New files. * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Addition of sem_scil.o. Update dependencies. From-SVN: r150199
2009-07-28gnat1drv.adb (Adjust_Global_Switches): Disable generation of SCIL nodes if ↵Javier Miranda1-0/+33
we are not generating code. 2009-07-28 Javier Miranda <miranda@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Disable generation of SCIL nodes if we are not generating code. * frontend.adb (Check_SCIL_Node): New subprogram. Used to check attribute SCIL_Related_Node of SCIL dispatching nodes. (Check_SCIL_Nodes): New instantiation of Traverse_Proc. * sinfo.ads (Is_SCIL_Node,Set_Is_SCIL_Node): Removed (SCIL_Nkind,Set_SCIL_Nkind): Removed. (SCIL_Entity): Update documentation. (SCIL_Related_Node): Update documentation. (SCIL_Controlling_Tag): New attribute. (SCIL_Target_Prim): Update documentation. (N_Null_Statement): Remove attributes associated with SCIL nodes. (N_SCIL_Dispatch_Table_Object_Init): New node. (N_SCIL_Dispatch_Table_Tag_Init): New node. (N_SCIL_Dispatching_Call): New node. (N_SCIL_Tag_Init): New node. * sinfo.adb (Is_SCIL_Node,Set_Is_SCIL_Node): Removed (SCIL_Nkind,Set_SCIL_Nkind): Removed. (SCIL_Controlling_Tag/Set_SCIL_Controlling_Tag): New subprogram. (SCIL_Entity,Set_SCIL_Entity): Applicable only to SCIL nodes. (SCIL_Related_Node,Set_SCIL_Related_Node): Applicable only to SCIL nodes (SCIL_Target_Prim,Set_SCIL_Target_Prim): Applicable only to N_SCIL_Dispatching_Call nodes. * sem.adb (Analyze): No need to analyze SCIL nodes. * sem_aux.ads, sem_aux.adb (First_Non_SCIL_Node): New subprogram (Next_Non_SCIL_Node): New subprogram * sem_ch4.adb (Analyze_Type_Conversion): Adjust relocated SCIL dispatching nodes. * sem_ch5.adb (Analyze_Iteration_Scheme): Adjust relocated SCIL dispatching node. * sem_util.adb (Insert_Explicit_Dereference): Adjust relocated SCIL dispatching node. * exp_ch3.adb (Build_Array_Init_Proc): Skip SCIL nodes when processing null statement nodes. (Build_Init_Procedure): Generate new SCIL node. * exp_ch4.adb (Expand_N_And_Then): Adjust relocated SCIL dispatching node. * exp_ch6.adb (Is_Null_Procedure): Skip SCIL nodes. Required because they are currently implemented as special N_Null_Statement nodes. * exp_ch7.adb (Wrap_Transient_Statement): If the relocated node is a procedure call then check if some SCIL node references it and needs readjustment. * exp_disp.ads (SCIL_Node_Kind): Removed. (Adjust_SCIL_Node): New subprogram. (Find_SCIL_Node): New subprogram. (Get_SCIL_Node_Kind): Removed. (New_SCIL_Node): Removed. * exp_disp.adb (Adjust_SCIL_Node): New subprogram (Expand_Dispatching_Call): Generate new SCIL dispatching node including decoration of its new controlling_tag attribute. (Get_SCIL_Node_Kind): Removed. (Find_SCIL_Node): New subprogram. (Make_Secondary_DT): Generate new SCIL nodes. (Make_Tags): Generate new SCIL nodes. (New_SCIL_Node): Removed. * exp_util.adb (Insert_Actions): Handle SCIL nodes. (Remove_Side_Effects): Check if relocated nodes require readjustment of some SCIL dispatching node. * gcc-interface/trans.c (gnat_to_gnu): Do nothing with new SCIL nodes. From-SVN: r150149
2009-07-27[multiple changes]Arnaud Charlet1-2/+2
2009-07-27 Robert Dewar <dewar@adacore.com> * exp_ch6.adb (Expand_Call): Reset Is_Known_Valid after call * sem_ch3.adb, sem_eval.adb, sem_aux.adb: Minor comment reformatting 2009-07-27 Geert Bosch <bosch@adacore.com> * checks.adb (Find_Check): Minor streamlining of logic. * gnat1drv.adb(Gnat1drv): Put Check_Rep_Info in its alphabetical order. * debug.adb: Document -gnatdX debug flag * exp_ch2.adb(Expand_Entity_Reference): Implement new -gnatdX flag to list information about reads from scalar entities. Also slightly simplify condition for Expand_Current_Value. * sem_util.ads, sem_util.adb (Is_LHS, Is_Actual_Out_Parameter): New functions. From-SVN: r150110
2009-06-25[multiple changes]Arnaud Charlet1-6/+20
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. From-SVN: r148938
2009-04-10[multiple changes]Arnaud Charlet1-1/+1
2009-04-10 Thomas Quinot <quinot@adacore.com> * exp_attr.adb: Minor reformatting 2009-04-10 Robert Dewar <dewar@adacore.com> * sem_aux.adb: Minor reformatting 2009-04-10 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Check_Precondition_Postcondition): Within a generic, analyze the expression for a postcondition, even if the compiler mode is Generate_Code. From-SVN: r145923
2009-04-10sem_aux.adb: Minor reformattingRobert Dewar1-2/+2
2009-04-10 Robert Dewar <dewar@adacore.com> * sem_aux.adb: Minor reformatting From-SVN: r145922
2009-04-10[multiple changes]Arnaud Charlet1-2/+1
2009-04-10 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Document that postconditions are tested on implicit returns. * sem_aux.adb: Minor reformatting 2009-04-10 Gary Dismukes <dismukes@adacore.com> * itypes.adb (Create_Null_Excluding_Itype): Apply Base_Type when setting Etype. * par-ch3.adb (P_Access_Type_Definition): Set new attribute Null_Exclusion_In_Return_Present when an access-to-function type has a result type with an explicit not null. * sem_ch3.adb (Access_Subprogram_Definition): If a null exclusion is given on the result type, then create a null-excluding itype for the function. * sem_ch6.adb (Analyze_Return_Type): Create a null-excluding itype in the case where a null exclusion is imposed on a named access type. (Analyze_Subprogram_Specification): Push and pop the scope of the function around the call to Analyze_Return_Type in the case of no formals, for consistency with handling when formals are present (Process_Formals does this). Ensures that any itype created for the return type will be associated with the proper scope. * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): If a null exclusion is given on a generic function's result type, then create a null-excluding itype for the generic function. (Instantiate_Object): Set Null_Exclusion_Present of a constant created for an actual for a formal in object according to the setting on the formal. Ensures null exclusion checks are done when the association is elaborated. * sinfo.ads: Add new flag Null_Exclusion_In_Return_Present on N_Access_Function_Definition. * sinfo.adb: Add Get_ and Set_ operations for Null_Exclusion_In_Return_Present. From-SVN: r145912
2009-04-10[multiple changes]Arnaud Charlet1-0/+2
2009-04-10 Robert Dewar <dewar@adacore.com> * mlib-tgt-specific-xi.adb: Minor reformatting 2009-04-10 Bob Duff <duff@adacore.com> * einfo.ads: Minor comment fixes 2009-04-10 Vincent Celier <celier@adacore.com> * snames.ads-tmpl: Remove names that are no longer used in the Project Manager. Mark specifically those that are used only in gprbuild 2009-04-10 Eric Botcazou <ebotcazou@adacore.com> * init.c: Adjust EH support code on Alpha/Tru64. 2009-04-10 Bob Duff <duff@adacore.com> * sem_ch6.adb (Process_PPCs): Add a call to the _Postconditions procedure on every path that could return implicitly (not via a return statement) from a procedure. 2009-04-10 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Build_Master_Entity): An extended return statement is a valid scope for a task declarations and therefore for a master id. 2009-04-10 Robert Dewar <dewar@adacore.com> * sem_aux.adb: Minor reformatting 2009-04-10 Vincent Celier <celier@adacore.com> * scn.adb (Obsolescent_Check_Flag): New Boolean flag, initialized to True. (Obsolescent_Check): Do nothing if Obsolescent_Check_Flag is False (Set_Obsolescent_Check): New procedure to change the value of Obsolescent_Check_Flag. * scn.ads (Set_Obsolescent_Check): New procedure to control Obsolescent_Check. * sinput-l.adb (Load_File): Do not check for pragma Restrictions on obsolescent features while preprocessing. From-SVN: r145901
2009-04-10[multiple changes]Arnaud Charlet1-14/+14
2009-04-10 Thomas Quinot <quinot@adacore.com> * xsnamest.adb: Use XUtil to have uniform line endings (UNIX style) in generated files on all platforms. 2009-04-10 Robert Dewar <dewar@adacore.com> * sem_aux.adb: Minor reformatting 2009-04-10 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Access_Definition): Handle properly the case of a protected function with formals that returns an anonymous access type. 2009-04-10 Thomas Quinot <quinot@adacore.com> * sem_disp.adb: Minor reformatting 2009-04-10 Vasiliy Fofanov <fofanov@adacore.com> * seh_init.c: Do not use the 32-bit specific implementation of __gnat_install_SEH_handler on 64-bit Windows target (64-bit specific version TBD). 2009-04-10 Jose Ruiz <ruiz@adacore.com> * mlib-tgt-specific-xi.adb (Get_Target_Prefix): Target_Name may contain a '/' at the end so we better use the complete target name to determine whether it is a PowerPC 55xx target. From-SVN: r145898
2009-04-10sem_aux.ads, [...] (Nearest_Current_Scope): New function.Robert Dewar1-1/+14
2009-04-10 Robert Dewar <dewar@adacore.com> * sem_aux.ads, sem_aux.adb (Nearest_Current_Scope): New function. * sem_res.adb (Resolve_Call): Fix test for Suppress_Value_Tracking_On_Call (was wrong for the case of a call from a non-dynamic scope). From-SVN: r145881
2009-04-09sem_aggr.adb, [...]: Reorganize einfo/sem_aux, moving routines from einfo to ↵Robert Dewar1-0/+713
sem_aux 2009-04-09 Robert Dewar <dewar@adacore.com> * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, exp_atag.adb, layout.adb, sem_dist.adb, exp_ch7.adb, sem_ch5.adb, sem_type.adb, exp_imgv.adb, exp_util.adb, sem_aux.adb, sem_aux.ads, exp_attr.adb, exp_ch9.adb, sem_ch7.adb, inline.adb, fe.h, sem_ch9.adb, exp_code.adb, einfo.adb, einfo.ads, exp_pakd.adb, checks.adb, sem_ch12.adb, exp_smem.adb, tbuild.adb, freeze.adb, sem_util.adb, sem_res.adb, sem_attr.adb, exp_dbug.adb, sem_case.adb, exp_tss.adb, exp_ch4.adb, exp_ch6.adb, sem_smem.adb, sem_ch4.adb, sem_mech.adb, sem_ch6.adb, exp_disp.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb, sem_cat.adb, exp_dist.adb, sem_ch13.adb, exp_strm.adb, lib-xref.adb, sem_disp.adb, exp_ch3.adb: Reorganize einfo/sem_aux, moving routines from einfo to sem_aux From-SVN: r145820
2008-04-08alloc.ads: Add entries for Obsolescent_Warnings tableRobert Dewar1-0/+62
2008-04-08 Robert Dewar <dewar@adacore.com> Bob Duff <duff@adacore.com> Gary Dismukes <dismukes@adacore.com> Ed Schonberg <schonberg@adacore.com> * alloc.ads: Add entries for Obsolescent_Warnings table * einfo.ads, einfo.adb: Minor reformatting. (Is_Discriminal): New subprogram. (Is_Prival): New subprogram. (Is_Protected_Component): New subprogram. (Is_Protected_Private): Removed. (Object_Ref, Set_Object_Ref): Removed. (Prival, Set_Prival): Change assertion. (Privals_Chain, Set_Privals_Chain): Removed. (Prival_Link, Set_Prival_Link): New subprogram. (Protected_Operation, Set_Protected_Operation): Removed. (Protection_Object, Set_Protection_Object): New subprogram. (Write_Field17_Name): Remove case for Object_Ref. (Write_Field20_Name): Add case for Prival_Link. (Write_Field22_Name): Remove case for Protected_Operation, Privals_Chain. Add case for Protection_Object. (Can_Use_Internal_Rep): Make this into a [base type only] attribute, so clients (Overlays_Constant): New flag (Is_Constant_Object): New predicate (Is_Standard_Character_Type): New predicate (Optimize_Alignment_Space): New flag (Optimize_Alignment_Time): New flag (Has_Postconditions): New flag (Obsolescent_Warrning): Field removed (Spec_PPC_List): New field (Relative_Deadline_Variable, Set_Relative_Deadline_Variable): Add subprograms to get and set the relative deadline associated to a task. * exp_attr.adb (May_Be_External_Call): Account for the case where the Access attribute is part of a named parameter association. (Expand_Access_To_Protected_Op): Test for the attribute occurring within an init proc and use that directly as the scope rather than traversing up to the protected operation's enclosing scope. Only apply assertion on Is_Open_Scopes in the case the scope traversal is done. For the init proc case use the address of the first formal (_init) as the protected object reference. Implement Invalid_Value attribute (Expand_N_Attribute_Reference): Case Attribute_Unrestricted_Access. contents of the dispatch table there is no need to duplicate the itypes associated with record types (i.e. the implicit full view of private types). Implement Enum_Val attribute (Expand_N_Attribute_Reference, case Old): Properly handle appearence within _Postconditions procedure (Expand_N_Attribute_Reference, case Result): Implement new attribute * exp_ch5.adb (Expand_N_Simple_Return_Statement): Handle case in which a return statement calls a function that is not available in configurable runtime. (Analyze_If_Statement): don't optimize simple True/False cases in -O0 (Expand_Non_Function_Return): Generate call to _Postconditions proc (Expand_Simple_Function_Return): Ditto * frontend.adb: Add call to Sem_Aux.Initialize * sem_aux.ads, sem_aux.adb: New file. * par-prag.adb: Add entries for pragmas Precondition/Postcondition Add new Pragma_Relative_Deadline. Add support for pragmas Check and Check_Policy * sem_attr.ads, sem_attr.adb (Check_Not_CPP_Type): New subprogram. (Check_Stream_Attribute): Add missing check (not allowed in CPP types) (Analyze_Attribute): In case of attributes 'Alignment and 'size add missing check because they are not allowed in CPP tagged types. Add Sure parameter to Note_Possible_Modification calls Add implementation of Invalid_Value attribute Implement new attribute Has_Tagged_Values Implement Enum_Val attribute (Analyze_Attribute, case Range): Set Name_Req True for prefix of generated attributes. (Analyze_Attribute, case Result): If prefix of the attribute is overloaded, it always resolves to the enclosing function. (Analyze_Attribute, case Result): Properly deal with analysis when Postconditions are not active. (Resolve_Attribute, case Result): Properly deal with appearence during preanalysis in spec. Add processing for attribute Result * sem_ch6.ads, sem_ch6.adb (Check_Overriding_Indicator): Code cleanup for operators. (Analyze_Subprogram_Body): Install private_with_clauses when the body acts as a spec. (Check_Inline_Pragma): recognize an inline pragma that appears within the subprogram body to which it applies. (Analyze_Function_Return): Check that type of the expression of a return statement in a function with a class-wide result is not declared at a deeper level than the function. (Process_PPCs): Deal with enabling/disabling, using PPC_Enabled flag (Verify_Overriding_Indicator): Handle properly subprogram bodies for user- defined operators. (Install_Formals): Moved to spec to allow use from Sem_Prag for analysis of precondition/postcondition pragmas. (Analyze_Subprogram_Body.Last_Real_Spec_Entity): New name for Last_Formal, along with lots of comments on what this is about (Analyze_Subprogram_Body): Fix case where we move entities from the spec to the body when there are no body entities (now possible with precondition and postcondition pragmas). (Process_PPCs): New procedure (Analyze_Subprogram_Body): Add call to Process_PPCs * sem_ch8.adb (Use_One_Type): refine warning on a redundant use_type clause. (Pop_Scope): Restore Check_Policy_List on scope exit (Push_Scope): Save Check_Policy_List on scope entry Change name In_Default_Expression => In_Spec_Expression Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve (Analyze_Object_Renaming): Allow 'Reference as object (Analyze_Pragma, case Restriction_Warnings): Call GNAT_Pragma (Process_Restrictions_Or_Restriction_Warnings): Check for bad spelling of restriction identifier. Add Sure parameter to Note_Possible_Modication calls * sem_prag.ads, sem_prag.adb (Analyze_Pragma, case Stream_Convert): Don't check for primitive operations when calling Rep_Item_Too_Late. (Process_Import_Or_Interface): Do not place flag on formal subprograms. (Analyze_Pragma, case Export): If the entity is a deferred constant, propagate information to full view, which is the one elaborated by the back-end. (Make_Inline): the pragma is effective if it applies to an internally generated subprogram declaration for a body that carries the pragma. (Analyze_Pragma, case Optimize_Alignment): Set new flag Optimize_Alignment_Local. (Analyze_PPC_In_Decl_Part): New procedure (Get_Pragma_Arg): Moved to outer level (Check_Precondition_Postcondition): Change to allow new visibility rules for package spec (Analyze_Pragma, case Check_Policy): Change placement rules to be same as pragma Suppress/Unsuppress. Change name In_Default_Expression => In_Spec_Expression Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve (Check_Precondition_Postcondition): Do proper visibility preanalysis for the case of these pragmas appearing in the spec. (Check_Enabled): New function (Initialize): New procedure (Tree_Read): New procedure (Tree_Write): New procedure (Check_Precondition_Postcondition): New procedure Implement pragmas Check and Check_Policy Merge Assert processing with Check * sem_warn.adb (Warn_On_Known_Condition): Handle pragma Check New warning flag -gnatw.e * sinfo.ads, sinfo.adb (Has_Relative_Deadline_Pragma): New function returning whether a task (or main procedure) has a pragma Relative_Deadline. (Set_Has_Relative_Deadline_Pragma): Procedure to indicate that a task (or main procedure) has a pragma Relative_Deadline. Add Next_Pragma field to N_Pragma node (PPC_Enabled): New flag (Next_Pragma): Now used for Pre/Postcondition processing * snames.h, snames.ads, snames.adb: New standard name Inherit_Source_Path Add entry for 'Invalid_Value attribute Add entry for new attribute Has_Tagged_Values Add entry for Enum_Val attribute Add new standard names Aggregate, Configuration and Library. Add _Postconditions Add _Result Add Pragma_Precondition Add Pragma_Postcondition Add Attribute_Result New standard name Archive_Builder_Append_Option (Preset_Names): Add _relative_deadline and relative_deadline definitions There was also a missing non_preemptive_within_priorities. (Get_Pragma_Id, Is_Pragma_Name): Add support for pragma Relative_Deadline. Add support for pragmas Check and Check_Policy * tree_gen.adb: Call Sem_Aux.Tree_Write * tree_in.adb: Call Sem_Aux.Tree_Read * exp_ch11.adb (Expand_N_Raise_Statement): New Build_Location calling sequence * exp_intr.adb (Expand_Source_Info): New Build_Location calling sequence * exp_prag.adb (Expand_Pragma_Relative_Deadline): New procedure. (Expand_N_Pragma): Call the appropriate procedure for expanding pragma Relative_Deadline. (Expand_Pragma_Check): New procedure * sinput.ads, sinput.adb (Build_Location_String): Now appends to name buffer. * sinfo.adb (PPC_Enabled): New flag From-SVN: r134010