aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch4.adb
AgeCommit message (Collapse)AuthorFilesLines
2011-08-04[multiple changes]Arnaud Charlet1-14/+14
2011-08-04 Javier Miranda <miranda@adacore.com> * exp_strm.adb (Build_Array_Input_Function): if the array type is constrained, do not attempt to build a subtype of it. 2011-08-04 Yannick Moy <moy@adacore.com> * errout.ads Change comments: remove 'R'M as an example where quotes are needed; add ALFA as another case where quotes are not needed * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another case where quotes are not needed. * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb: Remove all occurrences of 'A'L'F'A 2011-08-04 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb: check legality of invariant pragma. From-SVN: r177335
2011-08-04[multiple changes]Arnaud Charlet1-16/+19
2011-08-04 Yannick Moy <moy@adacore.com> * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram entities whose body contains an Annotate pragma which forces formal proof on this body. * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to Mark_Non_ALFA_Subprogram to pass in a message and node. * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate (Forma_Proof, On) which sets the flag Formal_Proof_On in the surrounding subprogram. * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram, Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked as not in ALFA is annotated with Formal_Proof being On, then an error is issued based on the additional parameters for message and node. * snames.ads-tmpl (Name_Formal_Proof): new name for annotation. * gcc-interface/Make-lang.in: Update dependencies. 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate Finalize_Address when CodePeer is enabled. 2011-08-04 Pascal Obry <obry@adacore.com> * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as the latter returns a pointer to a static buffer which is deallocated at the end of the routine. From-SVN: r177328
2011-08-03[multiple changes]Arnaud Charlet1-1/+7
2011-08-03 Yannick Moy <moy@adacore.com> * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean conditional expression in ALFA. * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean expressions as not in ALFA. 2011-08-03 Robert Dewar <dewar@adacore.com> * a-cofove.adb: Minor reformatting. 2011-08-03 Emmanuel Briot <briot@adacore.com> * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads (Insert_Project_Sources, Insert_withed_Sources_For): moved from the gprbuild sources. These packages are more logically placed in the Queue package, since they manipulate the queue. It is also likely that they can be adapted for gnatmake, thus sharing more code. (Finish_Program, Fail_Program): moved from the gprbuild sources, so that we could move the above. 2011-08-03 Emmanuel Briot <briot@adacore.com> * errutil.adb (Finalize): clean up the list of error messages on exit. Calling this subprogram multiple times will no longer show duplicate error messages on stderr. 2011-08-03 Emmanuel Briot <briot@adacore.com> * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter Getopt_Switches when we have already define a command line configuration. From-SVN: r177286
2011-08-03sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not in ALFA.Yannick Moy1-5/+20
2011-08-03 Yannick Moy <moy@adacore.com> * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not in ALFA. Instead, they are considered as assertions to prove. * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such nodes as not in ALFA. Instead, include conditional expressions in ALFA if they have no ELSE part, or if they occur in pre- and postconditions, where the Condition cannot have side-effects in ALFA (Analyze_Membership_Op): do not mark such nodes as not in ALFA (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA. Instead, include type conversion between scalar types in ALFA. * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA if-and-only-if its type is in ALFA. From-SVN: r177285
2011-08-03a-except.adb, [...] (Raise_From_Controlled_Operation): Rewritten to create ↵Hristian Kirtchev1-4/+4
the message strings when... 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com> * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation): Rewritten to create the message strings when the exception is not raised by an abort during finalization. * a-except.ads, a-except-2005.ads: Add pragma Export for procedure Raise_From_Controlled_Operation and update its associated comment. * a-fihema.ads, a-fihema.adb: New GNAT unit. Ada.Finalization.Heap_Management provides key functionality associated with controlled objects on the heap, their creation, finalization and reclamation. Type Finalization_Collection is effectively a wrapper which sits ontop of a storage pool and performs all necessary bookkeeping for all the objects it contains. Each access-to-controlled or access-to-class-wide type receives a collection as part of its expansion. The compiler generates buffer code and invokes Allocate / Deallocate to create and destroy allocated controlled objects. * a-finali.adb ("="): Removed. * a-finali.ads ("="): Removed. Controlled types no longer carry hidden fields Prev and Next. * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer. A library unit with at least one controlled object on the library level has a special finalizer which is invoked by the binder. To signal this, ali files carry field PF. * ali.ads: New field in type Unit_Record called Has_Finalizer. Add associated comment on field usage. * a-tags.adb (Get_RC_Offset): Removed. (Needs_Finalization): New routine. * a-tags.ads: Update the structure of the GNAT dispatch tables. Dispatch tables now carry field Needs_Finalization which provides runtime indication whether a type is controlled or has controlled components or both. Remove field RC_Offset. (Get_RC_Offset): Removed along with its associated pragma Export. Since tagged types with controlled components no longer carry hidden field _controller, the special mechanism to retrieve its location is no longer needed. (Needs_Finalization): New routine. * atree.ads, atree.adb (Elist24): New routine. (Set_Elist24): New routine. * atree.h: Add a define clause for Elist24. * bindgen.adb New library-level variable Lib_Final_Built. (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the presence of a VM target, the routine generates calls to the proper library finalization routine. (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM targets. Set the correct library finalization routine depending on whether the library has controlled objects or this is a VM compilation. (Gen_Finalize_Library_Ada): New routine. This procedure generates calls to library-level finalizers of compiled units in reverse order of elaboration. It also produces exception management code and reraises a potential exception after all units have been finalized. (Gen_Finalize_Library_C): New routine. This procedure generates calls to library-level finalizers of compiled units in reverse order of elaboration. (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the definitions of all library-level finalizers available to the compilation (Gen_Main_Ada): Directly call Adafinal which now contails all target dependent code. (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call System.Standard_Library.Adafinal directly. If the library needs finalization actions, create the sequence of finalization calls. (Gen_Output_File_Ada): Alphabetize local variables and constants. Generate a with clause for System.Soft_Links when compiling for a VM. Remove the code which imports System.Standard_Library.Adafinal as Do_Finalize. Generate the library finalization routine. (Gen_Output_File_C): Add new local constant Needs_Library_Finalization. If the library needs finalization actions, create all the definitions of library- level finalizers. (Has_Finalizer): New routine. Determines whether at least one compiled unit has a library-level finalizer. Add type Qualification_Mode. (Set_Unit_Name): Add a formal which controls the replacement of a dot. * einfo.adb: New usage of field 15 as Return_Flag. Remove Finalization_Chain_Entity from the usages of field 19. Remove Associated_Final_Chain from the usages of field 23. New usage of field 23 as Associated_Collection. New usage of field 24 as Finalizer. New usage of flag 252 as Is_Processed_Transient. (Associated_Final_Chain): Removed. (Associated_Collection): New routine. (Finalization_Chain_Entity): Removed. (Finalizer): New routine. (Is_Finalizer): New routine. (Is_Processed_Transient): New routine. (Return_Flag): New routine. (Set_Associated_Final_Chain): Removed. (Set_Associated_Collection): New routine. (Set_Finalization_Chain_Entity): Removed. (Set_Finalizer): New routine. (Set_Is_Processed_Transient): New routine. (Set_Return_Flag): New routine. (Write_Entity_Flags): Include Is_Processed_Transient to the list of displayed flags. (Write_Field8_Name): Alphabetize the output. (Write_Field11_Name): Alphabetize the output. (Write_Field12_Name): Alphabetize the output. (Write_Field13_Name): Alphabetize the output. (Write_Field14_Name): Alphabetize the output. (Write_Field15_Name): Alphabetize the output. (Write_Field16_Name): Alphabetize the output. (Write_Field17_Name): Alphabetize the output. (Write_Field18_Name): Alphabetize the output. (Write_Field19_Name): Alphabetize the output. Remove the output of Finalization_Chain_Entity. (Write_Field20_Name): Alphabetize the output. (Write_Field21_Name): Alphabetize the output. (Write_Field22_Name): Alphabetize the output. (Write_Field23_Name): Alphabetize the output. Remove the output of Associated_Final_Chain. Add output for Associated_Collection. (Write_Field24_Name): Alphabetize the output. (Write_Field25_Name): Add output for Finalizer. (Write_Field26_Name): Alphabetize the output. (Write_Field27_Name): Alphabetize the output. (Write_Field28_Name): Alphabetize the output. * einfo.ads: Add new field description for Associated_Collection and its uses in nodes. Remove Associated_Final_Chain and its uses in nodes. Remove Finalization_Chain_Entity and its uses in nodes. Add new field description for Finalizer and its uses in nodes. Add new synthesized attribute Is_Finalizer. Add new flag description for Is_Processed_Transient and its uses in nodes. Add new field description for Return_Flag and its uses in nodes. (Associated_Final_Chain): Removed along with its pragma Inline. (Associated_Collection): New routine and pragma Inline. (Finalization_Chain_Entity): Removed along with its pragma Inline. (Finalizer): New routine and pragma Inline. (Is_Finalizer): New routine and pragma Inline. (Is_Processed_Transient): New routine and pragma Inline. (Return_Flag): New routine and pragma Inline. (Set_Associated_Final_Chain): Removed along with its pragma Inline. (Set_Associated_Collection): New routine and pragma Inline. (Set_Finalization_Chain_Entity): Removed along with its pragma Inline. (Set_Finalizer): New routine and pragma Inline. (Set_Is_Processed_Transient): New routine and pragma Inline. (Set_Return_Flag): New routine and pragma Inline. * exp_aggr.adb: Alphabetize subprograms. (Build_Array_Aggr_Code): Remove formal Flist and its associated comment. (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their associated comments. Remove local variables External_Final_List and Attach. Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to Ancestor. Remove the retrieval of finalization lists. Update the call to Make_Adjust_Call. (Convert_Aggr_In_Allocator): Remove the retrieval of finalization lists. Update the call to Late_Expansion. (Convert_Aggr_In_Assignment): Update the call to Late_Expansion. (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion. (Gen_Assign): Remove the retrieval of the finalization list used to build the assignment. Update the calls to Make_Init_Call and Make_Adjust_Call. (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions. Remove the mechanism to determine attachment levels and finalization list retrieval. Remove the processing for coextensions. (Init_Controller): Removed. Controllers no longer exist. (Late_Expansion): Remove formals Flist and Obj along with their associated comments. Update the calls to Build_Record_Aggr_Code and Build_Array_Aggr_Code. * exp_ch13.adb (Expand_N_Free_Statement): New routine. (Expand_N_Freeze_Entity): Add special processing for finalizers which appear in entry bodies, protected subprograms and task bodies. * exp_ch13.ads (Expand_N_Free_Statement): New routine. * exp_ch3.adb (Add_Final_Chain): Removed. (Build_Array_Init_Proc): Alphabetize local variables. (Build_Assignment): Alphabetize local variables. Update the call to Maked_Adjust_Call. (Build_Class_Wide_Master): Rename local variables to better reflect their role. (Build_Discriminant_Assignments): Code reformatting. (Build_Init_Call_Thru): Code reformatting. (Build_Init_Procedure): Code reformatting. Generate a special version of Deep_Finalize which is capable of finalizing all initialized components and ignore the rest. (Build_Init_Statements): Rename local variables to better reflect their role. Reimplement the mechanism to include the creation and update of an index variable called a "counter". It is used as a bookmark for tracing initialized and non-initialized components. (Build_Initialization_Call): Remove local variable Controller_Typ. Alphabetize all local variables. Remove the initialization of the record controller and update the call to Make_Init_Call. (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent. New local variable Counter. (Constrain_Array): Alphabetize. (Expand_Freeze_Array_Type): Create a collection instead of a finalization list. (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive Finalize_Address which is used in conjunction with allocated controlled objects. (Expand_N_Object_Declaration): Remove the creation of a finalization list for anonymous access types. Update the calls to Make_Init_Call and Make_Adjust_Call. (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the retrieval of finalization lists. Remove the expansion of the record controller. Create TSS primitive Finalize_Address used in conjunction with controlled objects on the heap. Create finalization collections for access-to-controlled record components. (Expand_Record_Controller): Removed. (Freeze_Type): Remove the freezing of record controllers. Freezing of class-wide types now requires additional processing. Create finalization collections for access-to-controlled types. (Increment_Counter): New routine. (Make_Counter): New routine. (Make_Eq_If): Remove the mention of Name_uController. (Make_Predefined_Primitive_Specs): There is no longer need to skip types coming from System.Finalization_Root. (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles. (Predefined_Primitive_Bodies): There is no longer need to skip types coming from System.Finalization_Root. (Stream_Operation_OK): Do not generate stream routines for type Ada.Finalization.Heap_Management.Finalization_Collection. * exp_ch3.ads: Alphabetize subprograms. * exp_ch4.adb: Remove with and use clause for Sem_Ch8. Add with and use clause for Lib. (Complete_Coextension_Finalization): Removed. (Complete_Controlled_Allocation): New routine. Create a finalization collection for anonymous access-to-controlled types. Create a custom Allocate which interfaces with the back end and the machinery in Heap_Management. (Expand_Allocator_Expression): Add necessary calls to Complete_Controlled_Allocation. Remove the retrieval of finalization lists. Update the calls to Make_Adjust_Call. Generate a call to Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate the associated collection. (Expand_N_Allocator): Remove the processing for dynamic coextensions. Code clean up. Remove the retrieval of finalization lists and attachment levels. Update the call to Make_Init_Call. Generate a call to Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate the associated collection. (Get_Allocator_Final_List): Removed. Finalization lists are not available. (Suitable_Element): Remove the mention of Name_uController. * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp. (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of the left hand side, carry out the assignment and adjust the left hand side. * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed. (Add_Collection_Actual_To_Build_In_Place_Call): New routine. (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to BIP_Collection and BIPcollection. (Build_Heap_Allocator): New routine used to allocate the return object of a build-in-place function onto a collection. (Expand_Ctrl_Function_Call): Moved from Exp_Ch7. (Expand_Call): Do not replace direct calls to Deep routines with their aliases. (Expand_N_Extended_Return_Statement): Give all variables shorter names and update their occurrences. Add a special return flag to monitor the [ab]normal execution of the function. The flag is set right before the return statement. Rewrite the mechanism used to allocate a build-in-place return object on the heap or on a storage pool. (Is_Direct_Deep_Call): New routine. (Make_Build_In_Place_Call_In_Allocator): Add a collection to a build-in-place function call instead of a final list. Build a call to Set_Finalize_Address_Ptr to decorate the associated collection. (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in order to name the build-in-place function call's result for later finalization. Add a collection to a build-in-place function call instead of a final list. (Make_Build_In_Place_Call_In_Assignment): Add a collection to a build-in-place function call instead of a final list. Remove the code which moves one final list and transforms it into the actual in a nested build-in-place call. (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a build-in-place function call instead of a final list. (Move_Final_List): Removed. (Needs_BIP_Collection): New routine. (Needs_BIP_Final_List): Removed. * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in enumeration type BIP_Formal_Kind. Update the related comment. (Needs_BIP_Collection): New routine. (Needs_BIP_Final_List): Removed. * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the majority of subprograms in this unit. Add Name_Finalize_Address to array Name_Of and TSS_Finalize_Address to array Deep_Name_Of. (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization statements for an array type. (Build_Adjust_Statements): Create the adjust statements for a record type. (Build_Cleanup_Statements): New routine. A procedure which given any construct containing asynchronous calls, references to _master, or is a task body, a task allocation or a protected body produces the necessary runtime calls to clean up these constructs. (Build_Exception_Handler): New routine. (Build_Final_List): Removed. (Build_Finalization_Collection): New routine. A core procedure which creates a collection to service heap allocated controlled objects associated with an access-to-controlled type. (Build_Finalize_Statements): Create the finalization statements for a record types. (Build_Finalizer): New routine. A core procedure which given any construct with declarations and/or statements detects all objects which need any type of clean up (controlled objects, protected objects) and generates all necessary code to clean up the said objects in the proper order. (Build_Finalizer_Call): New routine. (Build_Initialize_Statements): Create the initialization statements for an array type. The generated routine contains code to finalize partially initialized arrays. (Build_Object_Declarations): New routine. (Build_Raise_Statement): New routine. (Clean_Simple_Protected_Objects): Removed. (Controller_Component): Removed. (Enclosing_Function): New routine. (Expand_Cleanup_Actions): Create a finalizer for a construct which has either declarations or statements or both. (Expand_N_Package_Body): Create a finalizer for a non-generic package. (Expand_N_Package_Declaration): Create a finalizer for a non-generic package. (Find_Final_List): Removed. (Global_Flist_Ref): Removed. (In_Finalization_Root): Removed. (Insert_Actions_In_Scope_Around): Determine the range of the transient scope in terms of tree nodes. Process all transient variables within that range. (Make_Adjust_Call): Rewritten. There is no longer an attach call generated after the adjust. (Make_Attach_Call): Removed. (Make_Call): New routine. (Make_Clean): Removed. (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate build routines. (Make_Deep_Proc): Rewritten to generate the new profile signature used in Deep routines. (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate build routines. (Make_Final_Call): Modified to simply create a call to either Deep_Finalize or Finalize. (Make_Finalize_Address_Body): New routine. (Make_Finalize_Address_Stmts): New routine. A function which produces TSS primitive Finalize_Address used in conjunction with heap allocated controlled objects. (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM. (Make_Init_Call): Rewritten. There is no longer an attach call generated after initialization. (Make_Local_Deep_Finalize): New routine. (Make_Set_Finalize_Address_Ptr_Call): New routine. (Make_Transient_Block): Remove the finalization list retrieval and manipulation. (Needs_Finalization): Moved to Exp_Util. (Parent_Field_Type): New routine. (Preprocess_Components): New routine. (Process_Transient_Objects): New routine. (Wrap_HSS_In_Block): New routine. (Wrap_Transient_Declaration): Remove finalization list management and controller insertion. (Wrap_Transient_Expression): Code reformatting. (Wrap_Transient_Statement): Code reformatting. * exp_ch7.ads (Build_Final_List): Removed. (Build_Finalization_Collection): New routine. (Build_Raise_Statement): New routine. (Controller_Component): Removed. (Expand_Ctrl_Function_Call): Moved to Exp_Ch6. (Find_Final_List): Removed. (In_Finalization_Root): Removed. (Is_Simple_Protected_Type): Update related comment. (Make_Adjust_Call): New parameter profile and associated comments. (Make_Attach_Call): Removed. (Make_Final_Call): New parameter profile and associated comments. (Make_Finalize_Address_Body): New routine. (Make_Init_Call): New parameter profile and associated comments. (Make_Local_Deep_Finalize): New routine. (Make_Set_Finalize_Address_Ptr_Call): New routine. (Needs_Finalization): Moved to Exp_Util. * exp_ch9.adb (Add_Object_Pointer): Code reformatting. (Expand_N_Protected_Body): Remove the handling of finalization lists. (Find_Protection_Type): Moved to Exp_Util. * exp_disp.adb: Remove with and use clauses for Exp_Ch7. (Make_DT): Update sequence of dispatch table initialization. Remove the initialization of field RC_Offset. Add initialization of field Needs_ Finalization. * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting. Reimplement how an object is first finalized, then deallocated. * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Code reformatting. * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address. Register TSS_Finalize_Address with type TSS_Names. * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core procedure provides the interface between an allocation / deallocation and the support machinery in Ada.Finalization.Heap_Management. (Find_Init_Call): Code reformatting. (Find_Init_Call_In_List): Code reformatting. (Find_Protection_Type): Moved from Exp_Ch9. (Find_Prim_Op): Reimplement to add preference of recovered primitive. (Has_Controlled_Coextensions): Removed. (Has_Controlled_Objects): New routine. (In_Library_Level_Package_Body): New routine. (Insert_Action_After): New routine. (Is_Finalizable_Transient): New routine. This predicate determines whether an object declaration is one of the many variants of controlled transients. (Is_Null_Access_BIP_Func_Call): New routine. (Is_Non_BIP_Func_Call): New routine. (Is_Related_To_Func_Return): New routine. (Needs_Finalization): Moved from Exp_Ch7. * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine. (Find_Protection_Type): Moved from Exp_Ch9. (Has_Controlled_Coextensions): Removed. (Has_Controlled_Objects): New routine. (In_Library_Level_Package_Body): New routine. (Insert_Action_After): New routine. (Is_Finalizable_Transient): New routine. (Is_Null_Access_BIP_Func_Call): New routine. (Is_Non_BIP_Func_Call): New routine. (Is_Related_To_Func_Return): New routine. (Needs_Finalization): Moved from Exp_ch7. * expander.adb (Expand): Add a case for N_Free_Statement. * freeze.adb (Freeze_All): Replace the generation of a finalization list with a collection for access-to-controlled types. (Freeze_Entity): Code reformatting. (Freeze_Record_Type): Remove the freezing of a record controller component. (Freeze_Subprogram): Code reformatting. * inline.adb (Cleanup_Scopes): Remove the reset of the scope finalization list. * lib-writ.adb (Write_Unit_Information): Output "PF" when a package has a library-level finalizer. * lib-writ.ads: Add "PF" to the sequence of unit attributes. * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed. * Makefile.rtl: Remove a-filico and s-finimp from the list of object files. Add a-fihema to the list of object files. * par-ch4.adb: Alphabetize the associations in type Is_Parameterless_Attribute. * rtsfind.ads: Ada.Finalization_List.Controller and System.Finalization_Implementation are no longer a GNAT unit. Update the range of type Ada_Finalization_Child. Remove the following recoverable entities: RE_Attach_To_Final_List RE_Deep_Tag_Attach RE_Finalize_List RE_Finalize_One RE_Finalizable_Ptr_Ptr RE_Global_Final_List RE_Limited_Record_Controller RE_List_Controller RE_Move_Final_List RE_Record_Controller RE_Simple_List_Controller Add the following recoverable entities: RE_Add_Offset_To_Address RE_Allocate RE_Base_Pool RE_Deallocate RE_Exception_Identity RE_Finalization_Collection RE_Finalization_Collection_Ptr RE_Needs_Finalization RE_Save_Library_Occurrence RE_Set_Finalize_Address_Ptr RE_Set_Storage_Pool_Ptr RE_Storage_Count * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of Name_uController. * sem_aux.adb (First_Discriminant): Remove mention of Name_uController. (First_Stored_Discriminant): Remove the mention of Name_uController. * sem_aux.ads: Comment reformatting. * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery to redecorate an already existing class-wide type. (Decorate_Tagged_Type): New parameter profile and associated comment. Create a "shadow class-wide type" for a shadow entity. * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting of the final chain along with the associated comment. * sem_ch3.adb (Access_Type_Declaration): Add new local variable Full_Desig and set it to the full view of the designated type. Initialize the finalization collection to empty. (Build_Derived_Record_Type): Alphabetize local variables. Code reformatting. (Collect_Fixed_Components): Remove the mention of Name_uController. (Create_Constrained_Components): Remove the mention of Name_uController. (Make_Class_Wide_Type): Add specialized code to redecorate an existing class-wide type of a shadow entity. (Process_Full_View): Update the machinery which marks type Limited_Controlled's entity as limited. * sem_ch4.adb (Analyze_One_Call): Code reformatting. * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization list, instead make a collection build-in-place formal. * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of a designated type in order to establish a match between the renaming and the renamed entity. (Find_Selected_Component): Add guard to prevent spurious exceptions from being raised on .NET/JVM. * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address to the list of primitive that need special processing. Update arrays C_Names and D_Names. (Replace_Types): Handle class-wide types. * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a different parameter profile, look at the first formal. * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and use clauses for Exp_Util. * sem_res.adb: Remove with and use clauses for Elists. (Propagate_Coextensions): Removed. (Resolve_Allocator): Do not propagate the list of coextensions from one allocator to another. * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable Deaccessed_T to Desig_Typ. (Enter_Name): Remove the mention of Name_uController. (Gather_Components): Remove the mention of Name_uController. (Incomplete_Or_Private_View): New routine. (Is_Coextension_Root): Removed. (Is_Fully_Initialized_Type): Remove the mention of Name_uController. * sem_util.ads (Incomplete_Or_Private_View): New routine. (Is_Coextension_Root): Removed. * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion. Controlled types are now derived from a null tagged record. Remove types Finalizable_Ptr, Finalizable and Empty_Root_Controlled. * sinfo.adb (Coextensions): Removed. (Set_Coextensions): Removed. * sinfo.ads: Remove Coextensions from the explanation of node fields and its uses in nodes. Update the field usage of N_Allocator. (Coextensions): Removed along with its pragma Inline. (Set_Coextensions): Removed along with its pragma Inline. * snames.ads-tmpl: Remove names Name_uClean Name_uController Name_uFinal_List Name_uLocal_Final_List Name_Finalization_Root Name_Next Name_Prev Add names Name_uFinalizer Name_Finalize_Address * s-pooglo.adb (Allocate): Add overriding indicator. (Deallocate): Add overriding indicator. (Storage_Size): Add overriding indicator. * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather than Finalize_Global_List. (Null_Finalize_Global_List): Removed. (Save_Library_Occurrence): New routine. * s-soflin.ads: Remove variable Finalize_Global_List along with its initialization. Add variable Finalize_Library_Objects along with its pragma Export. Add variables Library_Exception and Library_Exception_Set along with their pragma Export. (Null_Finalize_Global_List): Removed. (Save_Library_Occurrence): New routine. * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects rather than Finalize_Global_List. * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field of the constructed node. From-SVN: r177275
2011-08-03prj-proc.adb, [...]: Minor reformatting.Robert Dewar1-2/+2
2011-08-03 Robert Dewar <dewar@adacore.com> * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb, prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads, lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb, prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting. From-SVN: r177260
2011-08-03[multiple changes]Arnaud Charlet1-1/+4
2011-08-03 Javier Miranda <miranda@adacore.com> * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads: Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util. 2011-08-03 Bob Duff <duff@adacore.com> * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on the Base_Type. 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker> * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads, g-sehash.ads: Fix typo. Update header. 2011-08-03 Thomas Quinot <quinot@adacore.com> * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place expansion. 2011-08-03 Gary Dismukes <dismukes@adacore.com> * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider prefixes of private types along with records, since the selector may be a discriminant. * sem_res.adb (Resolve_Selected_Component): Consider prefixes of private types along with records, since the selector may be a discriminant. From-SVN: r177259
2011-08-03[multiple changes]Arnaud Charlet1-1/+2
2011-08-03 Robert Dewar <dewar@adacore.com> * exp_ch4.adb: Minor code cleanup. 2011-08-03 Thomas Quinot <quinot@adacore.com> * exp_dist.adb: Do not generate distribution stubs if serious errors have been diagnosed. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of the first formal of a primitive operation, go to the base type to handle properly an access to a derived type with constrained discriminants. * sem_type.adb (Disambiguate): an immediately visible operator hides a user-defined function that is only use-visible. * inline.adb: init procs are inlineable. From-SVN: r177253
2011-08-03[multiple changes]Arnaud Charlet1-0/+1
2011-08-03 Gary Dismukes <dismukes@adacore.com> * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete choices of a named array aggregate, bail out when any choices are marked as Errors_Posted. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope in which entity is frozen, to handle properly loop variables in iterators. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the subtype is not static, compute the upper bound using attributes, to handle properly index types that are not integer types. 2011-08-03 Bob Duff <duff@adacore.com> * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs. Update copyright notice. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Build_Discriminant_Constraints): Only use Original_Discriminant if within an instance. * sem_ch4.adb (Analyze_Selected_Component): Ditto. 2011-08-03 Thomas Quinot <quinot@adacore.com> * einfo.ads: Minor reformatting. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a composite type with an unfrozen subcomponent, in the profile of a primitive operation. From-SVN: r177236
2011-08-02[multiple changes]Arnaud Charlet1-14/+14
2011-08-02 Yannick Moy <moy@adacore.com> * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads, sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to indicate that we are in a precondition or postcondition. This is used in Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to decide whether to flag the spec or body of the current subprogram as not in ALFA. 2011-08-02 Fabien Chouteau <chouteau@adacore.com> * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package list. * a-extiin.ads: New file. 2011-08-02 Bob Duff <duff@adacore.com> * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename now raises Name_Error instead of Use_Error in certain cases. The other parts of this AI were already implemented properly. From-SVN: r177187
2011-08-02sem_ch3.adb, [...]: Protect call to Current_Subprogram which might be costly ↵Yannick Moy1-14/+14
when repeated. 2011-08-02 Yannick Moy <moy@adacore.com> * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb, sem_ch11.adb: Protect call to Current_Subprogram which might be costly when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into Mark_Non_ALFA_Subprogram_Body. Split body of Mark_Non_ALFA_Subprogram_Body to get body small and inlined. From-SVN: r177182
2011-08-02einfo.adb, einfo.ads (Body_Is_In_ALFA, [...]): get/set for new flag denoting ↵Yannick Moy1-0/+28
which subprogram bodies are in ALFA 2011-08-02 Yannick Moy <moy@adacore.com> * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set for new flag denoting which subprogram bodies are in ALFA * restrict.adb, sem_ch7.adb: Update comment * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch9.adb, sem_res.adb: Add calls to Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs. * sem_ch6.adb (Analyze_Function_Return): add calls to Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the middle of the body, and extended return. (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument False when missing return. (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA to True for subprograms whose spec is in ALFA. Remove later on the flag on the entity used for a subprogram body when there exists a separate declaration. * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA): if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to False, otherwise do nothing. From-SVN: r177177
2011-08-02sem_aggr.adb, [...]: cleanup of SPARK modeYannick Moy1-8/+8
2011-08-02 Yannick Moy <moy@adacore.com> * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb, errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, opt.ads: cleanup of SPARK mode From-SVN: r177175
2011-08-02[multiple changes]Arnaud Charlet1-2/+5
2011-08-02 Yannick Moy <moy@adacore.com> * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator before accessing operands. * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to decide whether an initialization expression respects SPARK rules, as the plain node is the expanded one. This allows for more valid warnings to be issued. * gnat_rm.texi: Minor update. 2011-08-02 Arnaud Charlet <charlet@adacore.com> * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert previous change. 2011-08-02 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, sem_ch4.adb: Minor reformatting. 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original loop statements and the element renaming declaration with a block when the element type is controlled. 2011-08-02 Yannick Moy <moy@adacore.com> * sinfo.ads: Minor formatting. 2011-08-02 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb (Add_Association): if the association has a box and no expression, use the Sloc of the aggregate itself for the new association. * errout.adb (First_Node): Exclude nodes with no Sloc, and always use the Original_Node. From-SVN: r177153
2011-08-02[multiple changes]Arnaud Charlet1-2/+36
2011-08-02 Pascal Obry <obry@adacore.com> * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting. 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization. Set the associated loop as the related expression of internally generated cursors. * exp_ch7.adb (Is_Container_Cursor): New routine. (Wrap_Transient_Declaration): Supress the finalization of the list controller when the declaration denotes a container cursor. 2011-08-02 Yannick Moy <moy@adacore.com> * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through command line now. * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the expression is a simple expression. This check cannot be performed in the semantics, so just drop it. (P_Index_Or_Discriminant_Constraint): move check that the index or discriminant is a subtype mark to Analyze_Subtype_Declaration in the semantics. Other cases were previously checked in the semantics. * par-ch4.adb (P_Name): move checks that a selector name is not character literal or an operator symbol to Find_Selected_Component in the semantics * par-ch5.adb (Parse_Decls_Begin_End): move check that basic declarations are not placed after later declarations in a separate procedure in Sem_Util (possibly not the best choice?), to be used both during parsing, for Ada 83 mode, and during semantic analysis, for SPARK mode. * par-endh.adb (Check_End): move check that end label is not missing to Process_End_Label in the semantics * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove the special case for SPARK restriction * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End * restrict.adb, restrict.ads (Check_Formal_Restriction): add a parameter Force to issue the error message even on internal node (used for generated end label). Call Check_Restriction to check when an error must be issued. In SPARK mode, issue an error message even if the restriction is not set. (Check_Restriction): new procedure with an additional out parameter to inform the caller that a message has been issued * sem_aggr.adb: Minor modification of message * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction instead of issuing an error message directly * sem_ch3.adb (Analyze_Declarations): move here the check that basic declarations are not placed after later declarations, by calling Check_Later_Vs_Basic_Declarations (Analyze_Subtype_Declaration): move here the check that an index or discriminant constraint must be a subtype mark. Change the check that a subtype of String must start at one so that it works on subtype marks. * sem_ch4.adb (Analyze_Call): move here the check that a named association cannot follow a positional one in a call * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction instead of issuing an error message directly * sem_ch8.adb (Find_Selected_Component): move here the check that a selector name is not a character literal or an operator symbol. Move here the check that the prefix of an expanded name cannot be a subprogram or a loop statement. * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new procedure called from parsing and semantics to check that basic declarations are not placed after later declarations (Process_End_Label): move here the check that end label is not missing 2011-08-02 Arnaud Charlet <charlet@adacore.com> * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum representation clause in codepeer mode, since it confuses CodePeer and does not bring useful info. 2011-08-02 Ed Falis <falis@adacore.com> * init.c: initialize fp hw on MILS. 2011-08-02 Ed Schonberg <schonberg@adacore.com> * errout.adb (First_Node): for bodies, return the node itself (small optimization). For other nodes, do not check source_unit if the node comes from Standard. From-SVN: r177151
2011-08-02errout.adb, errout.ads (Check_Formal_Restriction): new procedure which ↵Yannick Moy1-42/+6
issues an error in formal mode if... 2011-08-02 Yannick Moy <moy@adacore.com> * errout.adb, errout.ads (Check_Formal_Restriction): new procedure which issues an error in formal mode if its argument node is originally from source * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type has a discriminant specification so that it does not include the case of derived types (Derived_Type_Declaration): move here the test that a derived type has a discriminant specification * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the first element of a component association before accessing its choices (presence of component association is not enough) * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram declaration is a library item before accessing the next element in a list, as library items are not member of lists * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use Check_Formal_Restriction whenever possible. From-SVN: r177099
2011-08-02[multiple changes]Arnaud Charlet1-4/+7
2011-08-02 Robert Dewar <dewar@adacore.com> * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb, sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized expression to expression function. 2011-08-02 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb: transform simple Ada2012 membership into equality only if types are compatible. 2011-08-02 Yannick Moy <moy@adacore.com> * sem_res.adb (Matching_Static_Array_Bounds): new function which returns True if its argument array types have same dimension and same static bounds at each index. (Resolve_Actuals): issue an error in formal mode on actuals passed as OUT or IN OUT paramaters which are not view conversions in SPARK. (Resolve_Arithmetic_Op): issue an error in formal mode on multiplication or division with operands of fixed point types which are not qualified or explicitly converted. (Resolve_Comparison_Op): issue an error in formal mode on comparisons of Boolean or array type (except String) operands. (Resolve_Equality_Op): issue an error in formal mode on equality operators for array types other than String with non-matching static bounds. (Resolve_Logical_Op): issue an error in formal mode on logical operators for array types with non-matching static bounds. Factorize the code in Matching_Static_Array_Bounds. (Resolve_Qualified_Expression): issue an error in formal mode on qualified expressions for array types with non-matching static bounds. (Resolve_Type_Conversion): issue an error in formal mode on type conversion for array types with non-matching static bounds From-SVN: r177089
2011-08-01sem_util.ads, [...] (Last_Source_Statement): Replaces ↵Robert Dewar1-44/+0
Last_Source_Node_In_Sequence. 2011-08-01 Robert Dewar <dewar@adacore.com> * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement): Replaces Last_Source_Node_In_Sequence. * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and blank in string (this was inconsistently implemented). * errout.ads (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and blank in string (this was inconsistently implemented). * gnat1drv.adb (Set_Global_Switches): Set formal mode switches appropriately * opt.ads, opt.adb: Formal mode is now global switches, more consistent * par-prag.adb (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and call Set_Error_Msg_Lang to set "spark" as language name. * par.adb: Remove unnecessary call to set formal language for errout * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches appropriately and call Set_Error_Msg_Lang to set "spark" as language name. * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and calls to it, moved after resolution so that types are known * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if result of concatenation is not of type String (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of concatenation is not properly restricted * gnat_rm.texi: Add doc on pragma Spark_95. * gcc-interface/Makefile.in: Remove obsolete target pairs for Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads. * gcc-interface/Make-lang.in: Update dependencies. From-SVN: r177061
2011-08-01[multiple changes]Arnaud Charlet1-0/+92
2011-08-01 Yannick Moy <moy@adacore.com> * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character literal or operator symbol which is prefixed * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal mode on access attributes. * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check that concatenation operands are properly restricted in formal mode (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure Analyze_Concatenation_Operand. Issue an error in formal mode if the result of the concatenation has a type different from String. (Analyze_Conditional_Expression, Analyze_Explicit_Dereference, Analyze_Quantified_Expression, Analyze_Slice, Analyze_Null): issue an error in formal mode on unsupported constructs * sem_ch5.adb (Analyze_Block_Statement): only issue error on source block statement * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new function which returns the last node in a list of nodes for which Comes_From_Source returns True, if any * sem_ch6.adb (Check_Missing_Return): minor refactoring to use Last_Source_Node_In_Sequence * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming, Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal mode on unsupported constructs * sem_ch9.adb Do not return after issuing error in formal mode, as the rest of the actions may be needed later on since the error is marked as not serious. * sinfo.ads: Typos in comments. 2011-08-01 Pascal Obry <obry@adacore.com> * projects.texi: Minor editing. From-SVN: r177057
2011-08-01sem_ch3.adb, [...]: Minor reformattingRobert Dewar1-6/+12
2011-08-01 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb, sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb, sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting From-SVN: r177055
2011-08-01[multiple changes]Arnaud Charlet1-9/+13
2011-08-01 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified expressions. 2011-08-01 Arnaud Charlet <charlet@adacore.com> * sem_ch8.adb: Minor code editing. * s-vxwext.adb: Remove trailing space. * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for consistency with other files. 2011-08-01 Thomas Quinot <quinot@adacore.com> * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting. 2011-08-01 Ed Schonberg <schonberg@adacore.com> * par-ch10.adb: reject parameterized expressions as compilation unit. * sem_ch4.adb: handle properly conditional expression with overloaded then_clause and no else_clause. 2011-08-01 Tristan Gingold <gingold@adacore.com> * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address like done by System.Aux_DEC. * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table. From-SVN: r177050
2011-08-01[multiple changes]Arnaud Charlet1-5/+1
2011-08-01 Robert Dewar <dewar@adacore.com> * make.adb, sem_ch4.adb: Minor reformatting. * gcc-interface/Make-lang.in: Update dependencies. * sem_util.adb, exp_ch5.adb: Minor reformatting. 2011-08-01 Arnaud Charlet <charlet@adacore.com> * gnat_rm.texi: Fix definition of Long_Integer. 2011-08-01 Ed Schonberg <schonberg@adacore.com> * exp_aggr.adb: check limit size of static aggregate unconditionally, to prevent storage exhaustion. * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being finalized is a function body, insert the cleanup code before the final return statement, to prevent spurious warnings. * s-pooglo.ads: add overriding indicator. From-SVN: r177035
2011-08-01sem_ch4.adb (Operator_Check): improve error message when both a with_clause ↵Ed Schonberg1-4/+18
and a use_clause are needed to... 2011-08-01 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Operator_Check): improve error message when both a with_clause and a use_clause are needed to make operator usage legal. * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to determine whether a compilation unit is visible within an other, either through a with_clause in the current unit, or a with_clause in its library unit or one one of its parents. From-SVN: r177033
2011-08-01[multiple changes]Arnaud Charlet1-2/+4
2011-08-01 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator over an arbitrary expression of an array or container type. * lib-xref.adb: clarify comment. 2011-08-01 Bob Duff <duff@adacore.com> * einfo.ads: Minor reformatting. * debug.adb: Minor comment improvement. 2011-08-01 Javier Miranda <miranda@adacore.com> * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not consider hidden subprograms as valid candidates. 2011-08-01 Arnaud Charlet <charlet@adacore.com> * make.adb (Compile): Strip -mxxx switches in CodePeer mode. 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com> * gnat_ugn.texi: Fix typo. From-SVN: r177031
2010-12-20Fix typos in gcc/ada.Ralf Wildenhues1-6/+6
gcc/ada/: * projects.texi: Fix typos. * gnat_rm.texi: Likewise. * gnat_ugn.texi: Likewise. * sem_util.adb: Fix typo in variable, typos in comments. * a-btgbso.adb: Fix typos in comments. * a-cbdlli.adb, a-cbhase.ads, a-cdlili.adb, a-cobove.adb, a-coinve.adb, a-convec.adb, a-direct.ads, a-strunb-shared.adb, a-strunb-shared.ads, a-stuten.ads, a-stwiun-shared.adb, a-stwiun-shared.ads, a-stzunb-shared.adb, a-stzunb-shared.ads, a-suenco.adb, a-suenst.adb, a-suewst.adb, a-suezst.adb, ali.ads, aspects.ads, atree.ads, binde.adb, bindgen.adb, checks.adb, checks.ads, einfo.ads, err_vars.ads, errout.adb, errout.ads, exp_aggr.adb, exp_attr.adb, exp_cg.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_dbug.ads, exp_disp.adb, exp_fixd.ads, freeze.adb, g-altive.ads, g-comlin.ads, g-excact.ads, g-mbdira.adb, g-sechas.ads, g-sehash.ads, g-sha1.ads, g-sha224.ads, g-sha256.ads, g-sha384.ads, g-sha512.ads, g-shsh32.ads, g-shsh64.ads, g-socket.adb, g-socket.ads, g-sothco.ads, gcc-interface/decl.c, gcc-interface/trans.c, gcc-interface/utils2.c, gnat1drv.adb, init.c, inline.adb, link.c, locales.c, make.adb, mingw32.h, namet.ads, osint.adb, par-ch12.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-prag.adb, par.adb, par_sco.adb, prepcomp.adb, prj-conf.ads, prj-dect.adb, prj-env.adb, prj-env.ads, prj-nmsc.adb, prj-tree.ads, prj-util.ads, prj.adb, prj.ads, s-auxdec-vms-alpha.adb, s-auxdec-vms_64.ads, s-oscons-tmplt.c, s-osinte-vxworks.ads, s-osprim-mingw.adb, s-regexp.adb, s-stusta.adb, s-taprop-mingw.adb, s-taprop-solaris.adb, scn.adb, scos.ads, sem.adb, sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads, sem_ch12.adb, sem_ch12.ads, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_disp.adb, sem_disp.ads, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb, sem_scil.adb, sem_util.ads, sem_warn.adb, sem_warn.ads, sinfo.ads, socket.c, styleg.adb, switch.ads, sysdep.c, tb-alvxw.c, xoscons.adb: Likewise. From-SVN: r168082
2010-10-26sem_ch3.adb, [...]: Minor reformatting.Robert Dewar1-3/+1
2010-10-26 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, sem_ch4.adb, sem_disp.adb, switch-c.adb: Minor reformatting. * gnat_ugn.texi: Document -gnateP switch. From-SVN: r165953
2010-10-26[multiple changes]Arnaud Charlet1-1/+3
2010-10-26 Robert Dewar <dewar@adacore.com> * opt.ads (Treat_Categorization_Errors_As_Warnings): New flag * sem_cat.adb (Check_Categorization_Dependencies): Use Check_Categorization_Dependencies * switch-c.adb: GNAT Mode sets Treat_Categorization_Errors_As_Warnings -gnateP sets Treat_Categorization_Errors_As_Warnings * usage.adb: Add line for -gnateP switch 2010-10-26 Javier Miranda <miranda@adacore.com> * sem_ch3.adb (Add_Internal_Interface_Entities): Handle primitives inherited from the parent that cover interface primitives. (Derive_Progenitor_Subprograms): Handle primitives inherited from the parent that cover interface primitives. * sem_disp.adb (Find_Primitive_Covering_Interface): When searching in the list of primitives of the type extend the test to include inherited private primitives. * sem_ch6.ads (Is_Interface_Conformant): Add missing documentation. * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Add missing barrier to the loop searching for explicit overriding primitives. * sem_ch4.adb (Analyze_Indexed_Component_Form): Add missing barrier before accessing attribute Entity. 2010-10-26 Bob Duff <duff@adacore.com> * make.adb: Call Namet.Finalize, so we can get statistics. From-SVN: r165952
2010-10-26[multiple changes]Arnaud Charlet1-7/+0
2010-10-26 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb: Adjust format of error message. 2010-10-26 Robert Dewar <dewar@adacore.com> * einfo.ads, einfo.adb (OK_To_Reference): Removed, no longer used. * exp_util.adb (Side_Effect_Free): Put in safety barrier in code to detect renamings to avoid problems with invariants. * sem_ch13.adb (Replace_Type_References_Generic): New procedure (Build_Invariant_Procedure): Use Replace_Type_Reference_Generic (Build_Predicate_Function): Use Replace_Type_Reference_Generic * sem_res.adb, sem_ch8.adb, sem_ch4.adb (OK_To_Reference): Remove references, flag is no longer set. From-SVN: r165944
2010-10-26[multiple changes]Arnaud Charlet1-2/+2
2010-10-26 Matthew Heaney <heaney@adacore.com> * Makefile.rtl, impunit.adb: Add bounded hashed set and bounded hashed map containers. * a-cohata.ads: Add declaration of generic package for bounded hash table types. * a-chtgbo.ads, a-chtgbo.adb, a-chtgbk.ads, a-chtgbk.adb, a-cbhase.ads, a-cbhase.adb, a-cbhama.ads, a-cbhama.adb: New files. 2010-10-26 Ed Schonberg <schonberg@adacore.com> * sem_warn.adb: Improve warning message on overlapping actuals. 2010-10-26 Thomas Quinot <quinot@adacore.com> * sem_ch4.adb, exp_dist.adb: Minor reformatting. 2010-10-26 Vincent Celier <celier@adacore.com> * makeusg.adb (Makeusg): Add lines for switches -vl, -vm and -vh. 2010-10-26 Robert Dewar <dewar@adacore.com> * exp_ch3.adb (Expand_N_Object_Declaration): Move generation of predicate check to analyzer, since too much rewriting occurs in the analyzer. * sem_ch13.adb (Build_Predicate_Function): Change calling sequence, and change the order in which things are done to fix several errors in dealing with qualification of the type name. (Build_Static_Predicate): Built static predicate after full analysis of the body. This is necessary to fix several problems. * sem_ch3.adb (Analyze_Object_Declaration): Move predicate check here from expander, since too much expansion occurs in the analyzer to leave it that late. (Analyze_Object_Declaration): Change parameter Include_Null to new name Include_Implicit in Is_Partially_Initialized_Type call. (Analyze_Subtype_Declaration): Make sure predicates are proapagated in some strange cases of internal subtype generation. * sem_util.ads, sem_util.adb (Is_Partially_Initialized_Type): Change Include_Null to Include_Implicit, now includes the case of discriminants. 2010-10-26 Sergey Rybin <rybin@adacore.com> * gnat_rm.texi: Revise the documentation for pragma Eliminate. From-SVN: r165939
2010-10-25[multiple changes]Arnaud Charlet1-5/+4
2010-10-25 Robert Dewar <dewar@adacore.com> * exp_ch5.adb (Expand_Predicated_Loop): Remove code for loop through non-static predicate, since we agree not to allow this. (Expand_Predicated_Loop): Properlay handle false predicate (null list in Static_Predicate field. * sem_ch13.adb (Build_Static_Predicate): Extensive changes to clean up handling of more general predicate forms. 2010-10-25 Robert Dewar <dewar@adacore.com> * sem_ch4.adb, sem_util.adb: Minor reformatting. * sem_ch8.adb (Find_Selected_Component): Allow selection from instance of type in predicate or invariant expression. 2010-10-25 Pascal Obry <obry@adacore.com> * adaint.c (__gnat_stat_to_attr): Can set the timestamp on Windows now. (f2t): New routine. (__gnat_stat): Rewrite Win32 version. From-SVN: r165919
2010-10-25[multiple changes]Arnaud Charlet1-7/+33
2010-10-25 Robert Dewar <dewar@adacore.com> * sem_warn.adb, einfo.ads, exp_ch4.adb: Minor comment fix * sem_case.adb: Comment clarification for loops through false predicates. * sem_util.adb: Minor reformatting (Check_Order_Dependence): Fix bad double blank in error message 2010-10-25 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Membership_Op): in Ada_2012 a membership operation can have a single alternative that is a value of the type. Rewrite operation as an equality test. From-SVN: r165918
2010-10-22a-except-2005.adb (Rmsg_18): New message text.Robert Dewar1-5/+8
2010-10-22 Robert Dewar <dewar@adacore.com> * a-except-2005.adb (Rmsg_18): New message text. * a-except.adb (Rmsg_18): New message text. * atree.adb (List25): New function (Set_List25): New procedure * atree.ads (List25): New function (Set_List25): New procedure * einfo.adb (Static_Predicate): Is now a list (OK_To_Reference): Present in all entities * einfo.ads (Static_Predicate): Is now a list (OK_To_Reference): Applies to all entities * exp_ch13.adb (Build_Predicate_Function): Moved to Sem_Ch13 * sem_attr.adb (Bad_Attribute_For_Predicate): Call Bad_Predicated_Subtype_Use. * sem_case.ads, sem_case.adb: Major surgery to deal with predicated subtype case. * sem_ch13.adb (Build_Predicate_Function): Moved from Exp_Ch13 to Sem_Ch13. (Build_Static_Predicate): New procedure handles static predicates. * sem_ch3.adb (Analyze_Subtype_Declaration): Delay freeze on subtype with no constraint if ancestor subtype has predicates. (Analyze_Variant_Part): New calling sequence for Analyze_Choices * sem_ch4.adb (Junk_Operand): Don't complain about OK_To_Reference entity. (Analyze_Case_Expression): New calling sequence for Analyze_Choices * sem_ch5.adb (Analyze_Case_Statement): New calling sequence for Analyze_Choices. * sem_util.ads, sem_util.adb (Bad_Predicated_Subtype_Use): New procedure * types.ads (PE_Bad_Predicated_Generic_Type): Replaces PE_Bad_Attribute_For_Predicate. * atree.h: Add definition of List25. From-SVN: r165828
2010-10-22sem_ch4.adb: Minor reformatting.Robert Dewar1-1/+0
2010-10-22 Robert Dewar <dewar@adacore.com> * sem_ch4.adb: Minor reformatting. * sinfo.ads: Minor comment fixes for Ada 2012 syntax. From-SVN: r165826
2010-10-22[multiple changes]Arnaud Charlet1-3/+23
2010-10-22 Thomas Quinot <quinot@adacore.com> * exp_ch5.adb, sem_ch5.adb, sinfo.ads, snames.ads-tmpl, par-ch5.adb: Minor reformatting. 2010-10-22 Geert Bosch <bosch@adacore.com> * stand.ads: Fix typo in comment. 2010-10-22 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb: Enable in-out parameter for functions. 2010-10-22 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Quantified_Expression): Handle properly loop iterators that are transformed into container iterators after analysis. * exp_ch4.adb (Expand_N_Quantified_Expression): Handle properly both iterator forms before rewriting as a loop. 2010-10-22 Brett Porter <porter@adacore.com> * a-locale.adb, a-locale.ads, locales.c: New files. * Makefile.rtl: Add a-locale * gcc-interface/Makefile.in: Add locales.c From-SVN: r165812
2010-10-21a-cgaaso.ads, [...]: Minor reformattingRobert Dewar1-2/+7
2010-10-21 Robert Dewar <dewar@adacore.com> * a-cgaaso.ads, a-tags.ads, exp_ch3.adb, exp_attr.adb, exp_ch4.adb, exp_ch3.ads, exp_ch7.adb, exp_ch9.adb, exp_disp.adb, exp_disp.ads, exp_dist.adb, exp_util.adb, layout.adb, lib-xref.adb, lib.ads, prep.adb, prj-strt.adb, s-ststop.adb, s-taskin.ads, s-tataat.ads, sem_aggr.adb, sem_attr.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch4.ads, sem_ch5.adb, sem_res.adb, sem_util.adb, einfo.adb, g-sothco.ads, make.adb: Minor reformatting From-SVN: r165760
2010-10-21[multiple changes]Arnaud Charlet1-0/+2
2010-10-21 Robert Dewar <dewar@adacore.com> * exp_ch4.adb, exp_intr.adb, par-ch4.adb, scn.adb, sem_ch4.adb, sem_res.adb, sem_util.adb, sinfo.ads, a-except-2005.adb: Minor reformatting. * snames.ads-tmpl: Add note on Name_Some (not a reserved keyword). 2010-10-21 Geert Bosch <bosch@adacore.com> * ttypef.ads: Further cleanup of Safe_XXX float attributes. From-SVN: r165756
2010-10-19[multiple changes]Arnaud Charlet1-0/+27
2010-10-19 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb, exp_ch4.ads (Expand_Quantified_Expression): New procedure * exp_util.adb (Insert_Actions): Include Quantified_Expression. * expander.adb: Call Expand_Qualified_Expression. * par.adb: New procedure P_Quantified_Expression. Make P_Loop_Parameter_Specification global for use in quantified expressions. * par-ch3.adb (P_Subtype_Mark_Resync): Allow "some" as an identifier if version < Ada2012. * par-ch4.adb: New procedure P_Quantified_Expression. * par-ch5.adb: P_Loop_Parameter_Specification is now global. * scans.adb, scans.ads: Introduce token Some. For now leave as unreserved. * scn.adb (Scan_Reserved_Identifier): For earlier versions of Ada, treat Some as a regular identifier. * sem.adb: Call Analyze_Quantified_Expression. * sem_ch4.adb, sem_ch4.ads: New procedure Analyze_Quantified_Expression. * sem_ch5.adb, sem_ch5.ads: Analyze_Iteration_Scheme is public, for use in quantified expressions. * sem_res.adb: New procedure Resolve_Qualified_Expression. * sinfo.adb, sinfo.ads: New node N_Quantified_Expression * snames.ads-tmpl: New name Some. * sprint.adb: Output quantified_expression. 2010-10-19 Robert Dewar <dewar@adacore.com> * a-exexda.adb: Minor reformatting Minor code reorganization. From-SVN: r165698
2010-10-18[multiple changes]Arnaud Charlet1-1/+1
2010-10-18 Arnaud Charlet <charlet@adacore.com> * g-comlin.adb (Get_Switches): Prevent dereferencing null Config. 2010-10-18 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Add entries for aspects Read/Write/Input/Output. * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for handling aspects Read/Write/Input/Output. 2010-10-18 Robert Dewar <dewar@adacore.com> * sem_util.adb (Note_Possible_Modification): Do not give warning for use of pragma Unmodified unless we are sure this is a modification. 2010-10-18 Tristan Gingold <gingold@adacore.com> * sysdep.c: Add __gnat_get_stack_bounds. * s-taprop-mingw.adb Call __gnat_get_stack_bounds to set Pri_Stack_Info. 2010-10-18 Robert Dewar <dewar@adacore.com> * a-assert.ads: Fix bad name in header. * sem_ch4.adb, sem_ch6.adb, sem_ch7.adb, sem_ch10.adb: Minor reformatting. * exp_aggr.adb: Fix typo in comment. From-SVN: r165615
2010-10-11par-ch9.adb, [...]: Use Ada_2005 instead of Ada_05 (Ada_Version_Type).Bob Duff1-9/+9
2010-10-11 Bob Duff <duff@adacore.com> * par-ch9.adb, sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_ch5.adb, sem_type.adb, exp_imgv.adb, exp_util.adb, switch-c.adb, exp_attr.adb, exp_ch9.adb, par-ch11.adb, usage.adb, sem_ch9.adb, sem_ch10.adb, scng.adb, checks.adb, sem_prag.adb, sem_ch12.adb, par-ch2.adb, freeze.adb, par-ch4.adb, sem_util.adb, sem_res.adb, sem_attr.adb, par-ch6.adb, exp_ch4.adb, exp_ch6.adb, sem_ch4.adb, exp_ch8.adb, par-ch10.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb, par-ch12.adb, sem_ch8.adb, snames.adb-tmpl, opt.ads, exp_aggr.adb, sem_cat.adb, sem_ch13.adb, par-ch3.adb, exp_strm.adb, exp_cg.adb, lib-xref.adb, sem_disp.adb, exp_ch3.adb: Use Ada_2005 instead of Ada_05 (Ada_Version_Type). From-SVN: r165283
2010-10-11[multiple changes]Arnaud Charlet1-2/+2
2010-10-11 Bob Duff <duff@adacore.com> * sem_aggr.adb, impunit.adb, impunit.ads, switch-c.adb, usage.adb, sem_ch10.adb, sem_prag.adb, sem_ch12.adb, par-ch4.adb, par-ch6.adb, par-ch8.adb, exp_ch4.adb, sem_ch4.adb, sem_ch6.adb, par-prag.adb, opt.ads, par-ch3.adb, lib-xref.adb: Use Ada_2012 instead of Ada_12 (Ada_Version_Type). 2010-10-11 Javier Miranda <miranda@adacore.com> * exp_util.adb (Safe_Prefixed_Reference): If the prefix is an explicit dereference then do not exclude dereferences of access-to-constant types to handle them as constant view of variables (and hence remove side effects when required). * sem_res.adb (Resolve_Slice): Ensure that side effects in the bounds are properly handled. From-SVN: r165282
2010-10-11[multiple changes]Arnaud Charlet1-19/+50
2010-10-11 Robert Dewar <dewar@adacore.com> * sem_ch6.adb, s-htable.ads: Minor reformatting. 2010-10-11 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Selected_Component): If the selector is invisible in an instantiation, and both the formal and the actual are private extensions of the same type, look for the desired component in the proper view of the parent type. 2010-10-11 Vincent Celier <celier@adacore.com> * adaint.c (__gnat_number_of_cpus): Add implementation for Solaris, AIX, Tru64, Darwin, IRIX and HP-UX. From-SVN: r165277
2010-10-08ali.adb: Set Allocator_In_Body if AB parameter present on M lineRobert Dewar1-1/+46
2010-10-08 Robert Dewar <dewar@adacore.com> * ali.adb: Set Allocator_In_Body if AB parameter present on M line * ali.ads (Allocator_In_Body): New flag * bcheck.adb (Check_Consistent_Restrictions): Handle case of main program violating No_Allocators_After_Elaboration restriction. * gnatbind.adb (No_Restriction_List): Add entries for No_Anonymous_Allocators, and No_Allocators_After_Elaboration. * lib-load.adb: Initialize Has_Allocator flag * lib-writ.adb: Initialize Has_Allocator flag (M_Parameters): Set AB switch if Has_Allocator flag set * lib-writ.ads: Document AB flag on M line * lib.adb (Has_Allocator): New function (Set_Has_Allocator): New procedure * lib.ads (Has_Allocator): New function (Set_Has_Allocator): New procedure (Has_Allocator): New flag in Unit_Record * sem_ch4.adb (Analyze_Allocator): Add processing for No_Allocators_After_Elaboration. From-SVN: r165171
2010-10-08[multiple changes]Arnaud Charlet1-1/+1
2010-10-08 Thomas Quinot <quinot@adacore.com> * sem_ch4.adb: Minor reformatting. 2010-10-08 Hristian Kirtchev <kirtchev@adacore.com> * einfo.adb: Flag 232 (formerly Implemented_By_Entry) is now unused. (Implemented_By_Entry): Removed. (Set_Implemented_By_Entry): Removed. (Write_Entity_Flags): Remove the output for Implemented_By_Entry. * einfo.ads: Remove flag Implemented_By_Entry and its usage in entities. (Implemented_By_Entry): Removed along with its associated pragma Inline. (Set_Implemented_By_Entry): Removed along with its associated pragma Inline. * exp_ch9.adb: Alphabetize with and use clauses of Exp_Ch9. (Build_Dispatching_Call_Equivalent): New routine. (Build_Dispatching_Requeue): New routine. (Build_Dispatching_Requeue_To_Any): New routine. (Build_Normal_Requeue): New routine. (Build_Skip_Statement): New routine. (Expand_N_Requeue_Statement): Rewritten. The logic has been split into several subroutines. * par-prag.adb: Replace Pragma_Implemented_By_Entry by Pragma_Implemented. * sem_ch3.adb (Check_Abstract_Overriding): Perform checks concerning pragma Implemented. (Check_Pragma_Implemented): New routines. (Inherit_Pragma_Implemented): New routine. * sem_ch9.adb (Analyze_Requeue): Update the predicate which detects a dispatching requeue. * sem_prag.adb: Update array Sig_Flags by removing Implemented_By_Entry and adding Implemented. (Ada_2012_Pragma): New routine. (Analyze_Pragma, case Implemented): Perform all necessary checks concerning pragma Implemented and register the pragma as a representation item with the procedure_LOCAL_NAME. (Analyze_Pragma, case Implemented_By_Entry): Removed. * sem_util.adb (Implementation_Kind): New routine. * sem_util.ads (Implementation_Kind): New routine. * snames.ads-tmpl: Remove Name_Implemented_By_Entry and add Name_Implemented. Remove pragma name Pragma_Implemented_By_Entry and add Pragma_Implemented. Add special names By_Any, By_Entry and By_Protected_Procedure. 2010-10-08 Javier Miranda <miranda@adacore.com> * exp_ch3.adb (Expand_Freeeze_Record_Type): Code cleanup: remove local variable Has_Static_DT by invocation of function Building_Static_DT. 2010-10-08 Vincent Celier <celier@adacore.com> * g-dirope.adb (Remove_Dir): Do not change the current directory when doing a recursive remove of a subdirectory. 2010-10-08 Javier Miranda <miranda@adacore.com> * exp_ch6.ad (Freeze_Subprogram): Factorize code. * exp_disp.adb (Make_Secondary_DT): Factorize code. (Make_DT): Factorize code. From-SVN: r165154
2010-10-08sem_ch4.adb: Minor reformatting.Robert Dewar1-1/+3
2010-10-08 Robert Dewar <dewar@adacore.com> * sem_ch4.adb: Minor reformatting. 2010-10-08 Robert Dewar <dewar@adacore.com> * sem_ch6.adb (Check_Conformance): Check null exclusion match for full conformance. From-SVN: r165153
2010-10-07[multiple changes]Arnaud Charlet1-1/+9
2010-10-07 Robert Dewar <dewar@adacore.com> * sem_prag.adb, sem_ch13.adb: Implement AI05-0012-1/02. * gcc-interface/Make-lang.in: Update dependencies. 2010-10-07 Ed Schonberg <schonberg@adacore.com> * sem_ch12.ad: (Instantiate_Object): For an in-out formal of a child unit, if the type of the formal is declared in a parent unit and is not a formal itself, the actual must be located from an enclosing parent instance by normal visibility. 2010-10-07 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Allocator): In Ada 2012, a null_exclusion indicator is illegal for an uninitialized allocator. From-SVN: r165110
2010-10-05[multiple changes]Arnaud Charlet1-8/+8
2010-10-05 Robert Dewar <dewar@adacore.com> * sem_ch4.adb: Minor reformatting. * a-direct.ads: Minor comment update. 2010-10-05 Javier Miranda <miranda@adacore.com> * sem_ch3.adb (Add_Internal_Interface_Entities): Removing code that is no longer required after change in New_Overloaded_Entity. * sem_ch6.adb (New_Overloaded_Entity): Code reorganization to isolate the fragment of code that handles derivations of interface primitives. Add missing dependence on global variable Inside_Freezing_Actions to ensure the correct management of internal interface entities. * sem_ch13.adb (Analyze_Freeze_Entity): Add missing increase/decrease of the global variable Inside_Freezing_Actions to ensure that internal interface entities are well handled by New_Overloaded_Entity. * sem_disp.adb (Find_Primitive_Covering_Interface): Add documentation and complete the algorithm to catch hidden primitives derived of private type that covers the interface. * sem_disp.ads (Find_Primitive_Covering_Interface): Add missing documentation. From-SVN: r164982
2010-10-05prj-util.adb, [...]: Minor reformatting.Robert Dewar1-3/+4
2010-10-05 Robert Dewar <dewar@adacore.com> * prj-util.adb, prj-util.ads, prj.ads, s-vxwext-rtp.adb, sem_ch4.adb, sem_ch7.adb, sem_res.adb, sem_type.adb: Minor reformatting. Minor code reorganization (use Nkind_In). From-SVN: r164981
2010-10-05[multiple changes]Arnaud Charlet1-6/+16
2010-10-05 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb: Do not elaborate type definition if syntax error. 2010-10-05 Javier Miranda <miranda@adacore.com> * sprint.adb (Sprint_Node_Actual): Improve output of subprogram bodies to generate the full-qualified names of its corresponding spec. This facilitates locating the corresponing body when reading the DG output. 2010-10-05 Thomas Quinot <quinot@adacore.com> * exp_dist.adb (Make_Helper_Function_Name): For a tagged type, use canonical name without serial number only if the helper is becoming a primitive of the type. 2010-10-05 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Make_DT): Minor code reorganization. 2010-10-05 Ed Schonberg <schonberg@adacore.com> * par-ch6.adb: improve recovery with extra paren in function spec. 2010-10-05 Quentin Ochem <ochem@adacore.com> * prj-tree.ads: Project_Path is now aliased. 2010-10-05 Thomas Quinot <quinot@adacore.com> * checks.adb: Minor reformatting. 2010-10-05 Eric Botcazou <ebotcazou@adacore.com> * mlib-tgt-specific-mingw.adb (No_Argument_List): Delete. (Shared_Libgcc): New aliased variable. (Shared_Libgcc_Switch): New constant. (Build_Dynamic_Library): Pass Shared_Libgcc_Switch to the compiler * gcc-interface/Makefile.in (gnatlib-shared-win32): Pass -shared-libgcc to the compiler. 2010-10-05 Vincent Celier <celier@adacore.com> * prj-part.adb (Parse_Simple_Project): When checking if a child project imports its parent project, also look in projects being extended by imported projects. 2010-10-05 Eric Botcazou <ebotcazou@adacore.com> * gnat_ugn.texi: Adjust instructions in G.10 Building DLLs with GNAT. 2010-10-05 Javier Miranda <miranda@adacore.com> * exp_cg.adb (Slot_Number): Add support to handle aliased entities. (Generate_CG_Output): Switch -gnatd.Z is no longer needed to activate this output. 2010-10-05 Arnaud Charlet <charlet@adacore.com> * back_end.adb (Call_Back_End): Generate an error message when scil generation is enabled, and no scil back-end (by default) is available. 2010-10-05 Javier Miranda <miranda@adacore.com> * debug.adb: Update documentation because -gnatd.Z is no longer required to generate the call-graph information. 2010-10-05 Javier Miranda <miranda@adacore.com> * exp_ch5.adb (Expand_Simple_Function_Return): Rewrite expansion of a runtime access check by an equivalent expansion that causes no problems in the VM backend. The original expansion was not good for the VM backends because when Tagged_Type_Expansion is disabled the attribute Access_Disp_Table is not available. 2010-10-05 Ed Schonberg <schonberg@adacore.com> * sem_type.adb (Covers): In a dispatching context, T1 covers T2 if T2 is class-wide and T1 is its specific type. 2010-10-05 Ed Schonberg <schonberg@adacore.com> * einfo.adb: Add guard to Is_String_Type to prevent cascaded errors. 2010-10-05 Vincent Celier <celier@adacore.com> * back_end.ads: Minor spelling error correction. 2010-10-05 Arnaud Charlet <charlet@adacore.com> * switch-c.adb, gnat1drv.adb (Scan_Front_End_Switches): Disable warnings when -gnatC is specified here so that warnings can be re-enabled explicitly. (Adjust_Global_Switches): No longer suppress warnings. 2010-10-05 Vincent Celier <celier@adacore.com> * makeutl.adb: Minor reformatting. 2010-10-05 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb: add guard in Analyze_One_Call to prevent crash when a non-discrete type appears as an actual in a call. From-SVN: r164976
2010-10-04[multiple changes]Arnaud Charlet1-6/+2
2010-10-04 Robert Dewar <dewar@adacore.com> * sem_ch13.adb (Set_Biased): New procedure, now used throughout, adds name of entity to biased warning msg. (Analyze_Enumeration_Representation_Clause): Remove attempt to use biased rep (wrong and never worked anyway). 2010-10-04 Arnaud Charlet <charlet@adacore.com> * sem_elab.adb: Minor reformatting. 2010-10-04 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_Null): Handle properly the case of a subtype of an access_to_protected subprogram type, and convert null value into corresponding aggregate. 2010-10-04 Eric Botcazou <ebotcazou@adacore.com> * gnat_ugn.texi: Clarify first point of 7.1.5 about pragma Inline. 2010-10-04 Eric Botcazou <ebotcazou@adacore.com> * make.adb (Scan_Make_Arg): Pass -Oxxx switches to the linker as well. * gnatlink.adb (Gnatlink): Filter out -Oxxx switches for CLI, RTX and AAMP. 2010-10-04 Eric Botcazou <ebotcazou@adacore.com> * sem_ch4.adb (Analyze_Indexed_Component_Form): Remove redundant test for N_Operator_Symbol. (Indicate_Name_And_Type): Likewise. * sem_ch8.adb (Analyze_Subprogram_Renaming): Likewise. * sem_res.adb (Resolve): Likewise. * sem_type.adb (Add_One_Interp): Likewise. (Disambiguate): Likewise. 2010-10-04 Vincent Celier <celier@adacore.com> * osint.adb (Read_Library_Info_From_Full): If object timestamp is less than ALI file timestamp, return null. 2010-10-04 Vincent Celier <celier@adacore.com> * prj-makr.adb (Finalize): Invoke Pretty_Print with Max_Length set to 79 * prj-pp.adb (Pretty_Print): New parameter Max_Line_Length, that replaces global constant with the same name. When a line is too long, indent properly the next continuation line. * prj-pp.ads (Pretty_Print): New parameter Max_Line_Length with a range from 50 to 255, defaulted to 255, to indicate the maximum length of lines in the project file. 2010-10-04 Eric Botcazou <ebotcazou@adacore.com> * sem_ch7.adb (Analyze_Package_Body_Helper) <Has_Referencer>: New Check_Subprogram_Ref function and Check_Subprogram_Refs instantiation of Traverse_Func on it to look for subprogram references in a body. Call Check_Subprogram_Refs on the body of inlined subprograms at the outer level and keep clearing the Is_Public flag of subprograms as long as it returns OK. Do not look at anything else than subprograms once an inlined subprogram has been seen. From-SVN: r164940
2010-09-10[multiple changes]Arnaud Charlet1-6/+5
2010-09-10 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Build_Derived_Private_Type): Mark generated declaration of full view analyzed after analyzing the corresponding record declaration, to prevent spurious name conflicts with original declaration. 2010-09-10 Jerome Lambourg <lambourg@adacore.com> * sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the VM case, just issue a warning, but continue with the normal processing. 2010-09-10 Robert Dewar <dewar@adacore.com> * exp_attr.adb, prj-nmsc.adb, sem_ch4.adb, sem_res.adb: Minor reformatting. 2010-09-10 Thomas Quinot <quinot@adacore.com> * exp_dist.adb (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call): For a subtype inserted for the expansion of a generic actual type, go to the underlying type of the original actual type. 2010-09-10 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Assign_Array_Loop): In CodePeer mode, place a guard around the increment statement, to prevent an off-by-one-value on the last iteration. From-SVN: r164185