aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par.adb
AgeCommit message (Collapse)AuthorFilesLines
2017-09-25[multiple changes]Pierre-Marie de Rodat1-1/+1
2017-09-25 Justin Squirek <squirek@adacore.com> * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb, exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb, gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb, gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb, libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads, libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb, libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb, libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb, libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb, libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads, put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb, sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb: Removal of ineffective use-clauses. * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with constant folded barriers. * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to Subtype_Marks and Names list in use-clause nodes to their new singular counterparts (e.g. Subtype_Mark, Name). * par.adb, par-ch8.adb (Append_Use_Clause): Created to set Prev_Ids and More_Ids in use-clause nodes. (P_Use_Clause): Modify to take a list as a parameter. (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and subtype_marks within an aggregate use-clauses into individual clauses. * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to P_Use_Clause to match its new behavior. * sem.adb (Analyze): Mark use clauses for non-overloaded entities. * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous errors. * sem_ch6.adb (Analyze_Generic_Subprogram_Body, Analyze_Subprogram_Body_Helper): Update use clause chain at the end of the declarative region. * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain after analysis (Analyze_Package_Specification): Update use clause chain when there is no body. * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add parameter to determine weither the installation of scopes should also propagate on the use-clause "chain". (Mark_Use_Clauses): Created to traverse use-clause chains and determine what constitutes a valid "use" of a clause. (Update_Use_Clause_Chain): Created to aggregate common machinary used to clean up use-clause chains (and warn on ineffectiveness) at the end of declaritive regions. * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a package name from a use-package clause. (Analyze_Package_Name_List): Created to perform analysis on a list of package names (similar to Analyze_Package_Name). (Find_Most_Prev): Created to traverse to the beginning of a given use-clause chain. (Most_Decendant_Use_Clause): Create to identify which clause from a given set is highest in scope (not always the most prev). (Use_One_Package, Use_One_Type): Major cleanup and reorganization to handle the new chaining algorithm, also many changes related to redundant clauses. A new parameter has also been added to force installation to handle certain cases. * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body, Analyze_Task_Body): Mark use clauses on relevant entities. * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses, Install_Parents): Add parameter to determine weither the installation of scopes should also propagate on the use-clause "chain". * sem_ch12.adb (Inline_Instance_Body): Add flag in call to Install_Context to avoid redundant chaining of use-clauses. * sem_ch13.adb: Minor reformatting. * sem_res.adb (Resolve): Mark use clauses on operators. (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant entities. * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause, Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to represent any given clause's usage/reference/necessity. (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause nodes to allow loose chaining of redundant clauses. (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names, Set_More_Ids, Set_Name): Modify set procedure calls to reflect reorganization in node fields. * types.ads (Source_File_Index): Adjust index bounds. (No_Access_To_Source_File): New constant. 2017-09-25 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of the expression to be used in the generated attribute specification (rather than relocating it) to avoid resolving a potentially malformed tree when the expression is resolved through an ASIS-specific call to Resolve_Aspect_Expressions. This manifests itself as a crash on a function with parameter associations. From-SVN: r253144
2017-04-27[multiple changes]Arnaud Charlet1-3/+3
2017-04-27 Eric Botcazou <ebotcazou@adacore.com> * fe.h (Warn_On_Questionable_Layout): Declare. * warnsw.ads (Warn_On_Record_Holes): Move down. (Warn_On_Questionable_Layout): New boolean variable. (Warning_Record): Add Warn_On_Questionable_Layout field. * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout. (Restore_Warnings): Likewise. (Save_Warnings): Likewise. (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters. * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to components_to_record. (gnu_field_to_gnat): New function. (warn_on_field_placement): Likewise. (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER parameters. Rename local variables and adjust recursive call. Rework final scan of the field list and implement warnings on the problematic placement of specific sorts of fields. 2017-04-27 Bob Duff <duff@adacore.com> * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb, * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb, * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb, * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb, * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb: For efficiency, cache results of Is_Internal_File_Name and Is_Predefined_File_Name in the Units table. This avoids a lot of repeated text processing. 2017-04-27 Emmanuel Briot <briot@adacore.com> * g-comlin.adb (Sort_Sections): remove useless test. 2017-04-27 Claire Dross <dross@adacore.com> * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to allow the use of regular equality over elements in contracts. (Formal_Model): Ghost package containing model functions that are used in subprogram contracts. (Current_To_Last): Removed, model functions should be used instead. (First_To_Previous): Removed, model functions should be used instead. (Strict_Equal): Removed, model functions should be used instead. (No_Overlap): Removed, model functions should be used instead. (Equivalent_Keys): Functions over cursors are removed. They were awkward with explicit container parameters. * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to allow the use of regular equality over elements in contracts. (Formal_Model): Ghost package containing model functions that are used in subprogram contracts. (Current_To_Last): Removed, model functions should be used instead. (First_To_Previous): Removed, model functions should be used instead. (Strict_Equal): Removed, model functions should be used instead. (No_Overlap): Removed, model functions should be used instead. 2017-04-27 Yannick Moy <moy@adacore.com> * gnat1drv.adb: Code cleanup. 2017-04-27 Ed Schonberg <schonberg@adacore.com> * exp_util.adb (Replace_Entity): The prefix of a 'Result attribute reference in a post- condition is the subprogram to which the condition applies. If the condition is inherited by a type extension, the prefix becomes a reference to the inherited operation, but there is no need to create a wrapper for this operation, because 'Result is expanded independently when elaborating the postconditions. From-SVN: r247338
2017-04-25[multiple changes]Arnaud Charlet1-6/+10
2017-04-25 Bob Duff <duff@adacore.com> * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Use Source_Index (Current_Sem_Unit) to find the correct casing. * exp_prag.adb (Expand_Pragma_Check): Use Source_Index (Current_Sem_Unit) to find the correct casing. * par.adb (Par): Null out Current_Source_File, to ensure that the above bugs won't rear their ugly heads again. 2017-04-25 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Find_Type): For an attribute reference 'Class, if prefix type is synchronized and previous errors have suppressed the creation of the corresponding record type, create a spurious class-wide for the synchonized type itself, to catch other misuses of the attribute 2017-04-25 Steve Baird <baird@adacore.com> * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode is True, then don't generate the accessibility check for the tag of a tagged result. * exp_intr.adb (Expand_Dispatching_Constructor_Call): if CodePeer_Mode is True, then don't generate the tag checks for the result of call to an instance of Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a descendant of" check and the accessibility check). 2017-04-25 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb: Code cleanups. * a-strbou.ads: minor whitespace fix in Trim for bounded strings. * sem_ch8.ads: Minor comment fix. From-SVN: r247168
2017-04-25[multiple changes]Arnaud Charlet1-2/+2
2017-04-25 Hristian Kirtchev <kirtchev@adacore.com> * sem_attr.adb, sem_ch5.adb: Minor reformatting. 2017-04-25 Bob Duff <duff@adacore.com> * types.ads: Minor: Fix '???' comment. * sem_ch8.adb: Minor comment fix. 2017-04-25 Bob Duff <duff@adacore.com> * sem_prag.adb: Remove suspicious uses of Name_Buf. * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove Add_String_To_Name_Buffer, to avoid using the global Name_Buf. Add String_To_Name with no side effects. 2017-04-25 Justin Squirek <squirek@adacore.com> * sem_ch3.adb (Analyze_Declarations): Add additional condition for edge case. 2017-04-25 Bob Duff <duff@adacore.com> * par-ch2.adb, scans.ads, scn.adb: Do not give an error for reserved words inside pragmas. This is necessary to allow the pragma name Interface to be used in pragma Ignore_Pragma. * par.adb: Minor comment fix. 2017-04-25 Javier Miranda <miranda@adacore.com> * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract. * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract. * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract. * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update occurrences of RE_Type_Is_Abstract 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com> * exp_util.adb (Build_Chain): Account for ancestor subtypes while traversing the derivation chain. From-SVN: r247150
2017-04-25[multiple changes]Arnaud Charlet1-0/+6
2017-04-25 Javier Miranda <miranda@adacore.com> * exp_ch3.adb (Build_Initialization_Call): Handle subtypes of private types when searching for the underlying full view of a private type. 2017-04-25 Javier Miranda <miranda@adacore.com> * sem_res.adb (Set_Mixed_Mode_Operand): A universal real conditional expression can appear in a fixed-type context and must be resolved with that context to facilitate the code generation to the backend. 2017-04-25 Ed Schonberg <schonberg@adacore.com> * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag, to indicate whether during inline processing, when some unit U1 appears in the context of a unit U2 compiled for instantiation or inlining purposes, the body of U1 needs to be compiled as well. * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if context is a package declaration. * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration, Analyze_Generic_Package_Declaration): ditto. * inline.adb (Analyze_Inlined_Bodies): Check Body_Needed_For_Inlining. 2017-04-25 Ed Schonberg <schonberg@adacore.com> * par.adb (Current_Assign_Node): Global variable use to record the presence of a target_name in the right hand side of the assignment being parsed. * par-ch4.adb (P_Name): If the name is a target_name, mark the enclosing assignment node accordingly. * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node appropriately. * sem_ch5.adb (Analyze_Assignment): Disable expansion before analyzing RHS if the statement has target_names. * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle properly choices that are subtype marks. * exp_ch5.adb: Code cleanup. 2017-04-25 Bob Duff <duff@adacore.com> * s-memory.adb: Add a comment regarding efficiency. * atree.adb: Fix the assertion, and combine 2 assertions into one, "the source has an extension if and only if the destination does." * sem_ch3.adb, sem_ch13.adb: Address ??? comments. 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek> * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits conversion. 2017-04-25 Doug Rupp <rupp@adacore.com> * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp handling for ppc64-vx7. * sigtramp-vxworks-target.inc [SIGTRAMP_BODY]: Add section for ppc64-vx7. From-SVN: r247146
2017-01-23[multiple changes]Arnaud Charlet1-2/+2
2017-01-23 Gary Dismukes <dismukes@adacore.com> * exp_strm.ads: Minor reformatting and typo fixes. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb, exp_aggr.adb: Minor reformatting. * g-diopit.adb: minor grammar/punctuation fix in comment. * g-byorma.ads: minor fix of unbalanced parens in comment. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * par.adb: Update the documentation of component Labl. * par-ch6.adb (P_Return_Statement): Set the expected label of an extended return statement to Error. 2017-01-23 Tristan Gingold <gingold@adacore.com> * s-boustr.ads, s-boustr.adb (Is_Full): New function. 2017-01-23 Ed Schonberg <schonberg@adacore.com> * expander.adb: Handle N_Delta_Aggregate. 2017-01-23 Javier Miranda <miranda@adacore.com> * exp_ch6.adb (Expand_Call): Improve the code that checks if some formal of the called subprogram is a class-wide interface, to handle subtypes of class-wide interfaces. 2017-01-23 Javier Miranda <miranda@adacore.com> * checks.adb (Apply_Parameter_Aliasing_Checks): Remove side effects of the actuals before generating the overlap check. From-SVN: r244806
2017-01-12contracts.adb, [...] (Pragma_Name): Change name to Pragma_Name_Unmapped.Bob Duff1-4/+6
2017-01-12 Bob Duff <duff@adacore.com> * contracts.adb, einfo.adb, errout.adb, exp_attr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb, frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb, par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb, sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb, sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads, sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name): Change name to Pragma_Name_Unmapped. (Pragma_Name_Mapped): Change name to Pragma_Name. This is because the "mapped" version should be the usual case. From-SVN: r244352
2016-04-18[multiple changes]Arnaud Charlet1-3/+3
2016-04-18 Arnaud Charlet <charlet@adacore.com> * sem_prag.adb (Process_Convention): Relax rule on exporting Intrinsic types if Relaxed_RM_Semantics is True. 2016-04-18 Vincent Celier <celier@adacore.com> * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads, checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads, sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb, exp_ch3.ads, exp_unst.adb: Change "descendent" to "descendant" in comments, error messages and identifiers. 2016-04-18 Eric Botcazou <ebotcazou@adacore.com> * sem_type.adb (Operator_Matches_Spec): Call First_Formal on New_S only once at the beginning of the function. From-SVN: r235100
2015-10-27[multiple changes]Arnaud Charlet1-2/+2
2015-10-27 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Allocator): Do not perform legality check on allocators for limited objects in a qualified expression, because expression has not been resolved. * sem_res.adb (Resolve_Allocator): Perform check on legality of limited objects after resolution. Add sem_ch3.adb to context. 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Refined_Global_In_Decl_Part): Add variable States. (Check_Refined_Global_Item): An object or state acts as a constituent only when the corresponding encapsulating state appears in pragma Global. (Collect_Global_Item): Add a state with non-null visible refinement to list States. 2015-10-27 Gary Dismukes <dismukes@adacore.com> * sem_util.ads, par.adb, sem_ch6.adb: Minor reformatting and a few typo corrections. 2015-10-27 Pierre-Marie de Rodat <derodat@adacore.com> * namet.ads, namet.adb (Name_Equals): New function. * namet.h (Name_Equals): New macro. 2015-10-27 Arnaud Charlet <charlet@adacore.com> * exp_ch6.adb (Build_Procedure_Form): Use 'RESULT' for the extra parameter, to avoid ambiguity when generating tmps using _xxx which might end up reusing _result. From-SVN: r229424
2015-10-26[multiple changes]Arnaud Charlet1-0/+3
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com> * atree.ads, atree.adb (Ekind_In): New 10 and 11 parameter versions. * contracts.ads, contracts.adb (Analyze_Initial_Declaration_Contract): New routine. * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Analyze the contract of the initial declaration. (Analyze_Subprogram_Body_Helper): Analyze the contract of the initial declaration. * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the contract of the initial declaration. * sem_ch9.adb (Analyze_Entry_Body): Analyze the contract of the initial declaration. (Analyze_Protected_Body): Analyze the contract of the initial declaration. (Analyze_Task_Body): Analyze the contract of the initial declaration. * sem_prag.adb (Add_Entity_To_Name_Buffer): Use "type" rather than "unit" as it makes the error messages sound better. (Add_Item_To_Name_Buffer): Update comment on usage. The routine now supports discriminants and current instances of concurrent types. (Analyze_Depends_In_Decl_Part): Install the discriminants of a task type. (Analyze_Global_In_Decl_Part): Install the discriminants of a task type. (Analyze_Global_Item): Add processing for current instances of concurrent types and include discriminants as valid global items. (Analyze_Input_Output): Discriminants and current instances of concurrent types are now valid items. Update various error messages. (Check_Usage): Current instances of protected and task types behaves as formal parameters. (Collect_Subprogram_Inputs_Outputs): There is no longer need to manually analyze [Refined_]Global thanks to freezing of initial declaration contracts. Add processing for the current instance of a concurrent type. (Find_Role): Add categorizations for discriminants, protected and task types. (Is_CCT_Instance): New routine. (Match_Items): Update the comment on usage. Update internal comments. * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update the comment on usage. * sem_util.adb (Entity_Of): Ensure that the entity is an object when traversing a potential renaming chain. (Fix_Msg): Use "type" rather than "unit" as it makes the error messages sound better. * sem_util.ads (Fix_Msg): Update the comment on usage. 2015-10-26 Arnaud Charlet <charlet@adacore.com> * par.adb (Par): Do not generate an error when generating SCIL for predefined units or new children of system and co. 2015-10-26 Ed Schonberg <schonberg@adacore.com> * einfo.adb: Access_Disp_Table applies to a private extension. From-SVN: r229373
2015-07-13Fix double word typos.Aldy Hernandez1-1/+1
From-SVN: r225726
2015-02-05015-02-05 Robert Dewar <dewar@adacore.com>Arnaud Charlet1-10/+15
* sem_ch13.adb (Add_Invariants): Don't assume invariant is standard Boolean. * sem_prag.adb (Analyze_Pragma, case Check): Don't assume condition is standard Boolean, it can be non-standard derived Boolean. 2015-02-05 Robert Dewar <dewar@adacore.com> * checks.adb (Enable_Range_Check): Disconnect attempted optimization for the case of range check for subscript of unconstrained array. 2015-02-05 Robert Dewar <dewar@adacore.com> * par-ch13.adb (With_Present): New function (Aspect_Specifications_Present): Handle WHEN in place of WITH (Get_Aspect_Specifications): Comment update. * par.adb: Comment updates. 2015-02-05 Robert Dewar <dewar@adacore.com> * errout.adb (Handle_Serious_Error): New setting of Fatal_Error. * frontend.adb (Frontend): New setting of Fatal_Error. * lib-load.adb (Create_Dummy_Package_Unit): New setting of Fatal_Error. (Load_Main_Source): New setting of Fatal_Error (Load_Unit): New setting of Fatal_Error. * lib-writ.adb (Add_Preprocessing_Dependency): New setting of Fatal_Error. (Ensure_System_Dependency): New setting of Fatal_Error. * lib.adb (Fatal_Error): New setting of Fatal_Error (Set_Fatal_Error): New setting of Fatal_Error. * lib.ads: New definition of Fatal_Error and associated routines. * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error. * par-load.adb (Load): New setting of Fatal_Error. * rtsfind.adb (Load_RTU): New setting of Fatal_Error. * sem_ch10.adb (Analyze_Compilation_Unit): New setting of Fatal_Error. (Optional_Subunit): New setting of Fatal_Error. (Analyze_Proper_Body): New setting of Fatal_Error. (Load_Needed_Body): New setting of Fatal_Error. 2015-02-05 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Call): If the function being called has out parameters do not check for language version if the function comes from a predefined unit, as those are always compiled in Ada 2012 mode. 2015-02-05 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Process_Full_View): Verify that the full view of a type extension must carry an explicit limited keyword if the partial view does (RM 7.3 (10.1)). From-SVN: r220446
2015-01-06[multiple changes]Arnaud Charlet1-1/+1
2015-01-06 Pierre-Marie Derodat <derodat@adacore.com> * scos.ads: Update documentation about the SCO table build process and about table records format. * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw. (SCO_Record_Filtered): New procedure. (Set_SCO_Logical_Operator): New procedure. (dsco): Update documentation. * par_sco.adb: Update library-level comments. (SCO_Generation_State_Type): New type. (SCO_Generation_State): New variable. (SCO_Raw_Table): New package instanciation. (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table. ("<"): New. (Tristate): New type. (Is_Logical_Operator): Return Tristate and update documentation. (Has_Decision): Update call to Is_Logical_Operator and complete documentation. (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update comment, add an assertion for state checking and change references to SCO_Table into SCO_Raw_Table. (dsco): Refactor to dump the raw and the filtered tables. (Process_Decisions.Output_Decision_Operand): Handle putative short-circuit operators. (Process_Decisions.Output_Element): Update references to Set_Table_Entry and to Condition_Pragma_Hash_Table. (Process_Decisions.Process_Decision_Operand): Update call to Is_Logical_Operator. (Process_Decisions.Process_Node): Handle putative short-circuit operators and change references to SCO_Table into SCO_Raw_Table. (SCO_Output): Add an assertion for state checking and remove code that used to stamp out SCO entries. (SCO_Pragma_Disabled): Change reference to SCO_Table into SCO_Raw_Table. (SCO_Record): Rename to SCO_Record_Raw, add an assertion for state checking and change references to SCO_Table into SCO_Raw_Table. (Set_SCO_Condition): Add an assertion for state checking, update references to Condition_Pragma_Hash_Table and change references to SCO_Table into SCO_Raw_Table. (Set_SCO_Pragma_Enabled): Add an assertion for state checking and change references to SCO_Table into SCO_Raw_Table. (Set_SCO_Logical_Operator): New procedure. (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update references to Set_Table_Entry and to Condition_Pragma_Hash_Table. (SCO_Record_Fildered): New procedure. * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass. * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and output SCOs. * par-load.adb (Load): Update reference to SCO_Record. * par.adb (Par): Update reference to SCO_Record. * put_scos.adb (Put_SCOs): Add an assertion to check that no putative SCO condition reaches this end. * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record. * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs when corresponding to an "and"/"or" operator affected by the Short_Circuit_And_Or pragma. 2015-01-06 Robert Dewar <dewar@adacore.com> * sem_ch8.adb (Analyze_Use_Package): Give more specific error msg for attempted USE of generic subprogram or subprogram. From-SVN: r219234
2014-10-20[multiple changes]Arnaud Charlet1-1/+6
2014-10-20 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, prj-proc.adb, prj-proc.ads, prj-conf.adb: Minor reformatting. 2014-10-20 Robert Dewar <dewar@adacore.com> * par-prag.adb (Add_List_Pragma_Entry): New procedure. * par.adb (P_Pragma): Document requirement to handle multiple calls. 2014-10-20 Robert Dewar <dewar@adacore.com> * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All): Fix error of bad inheritance of this pragma from with'ed unit. 2014-10-20 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a subtype, inherit convention from parent type, because the subtype may have been declared on a partial view, prior to the pragma on the parent. 2014-10-20 Olivier Hainque <hainque@adacore.com> Tristan Gingold <gingold@adacore.com> * gcc-interface/Makefile.in: Handle arm-darwin and VxWorks 7. Misc clean ups. 2014-10-20 Nicolas Roche <roche@adacore.com> * gcc-interface/Make-lang.in: ensure that automatically generated dependency are referencing generated gnatvsn rather than original one. From-SVN: r216482
2014-08-01[multiple changes]Arnaud Charlet1-3/+1
2014-08-01 Vincent Celier <celier@adacore.com> * make.adb (Await_Compile): Remove loop that was only needed for VMS. 2014-08-01 Robert Dewar <dewar@adacore.com> * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb, a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb, a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb, einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb, fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads, g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads, g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb, krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb, mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb, osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb, prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb, rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads, s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads, s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb, s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads, s-taspri-posix-noaltstack.ads, s-taspri-posix.ads, s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads, sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb, sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads, sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb, treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS specific code and comments. 2014-08-01 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Iterator_Specification): New procedure Check_Reverse_Iteration, to verify the legality of the Reverse indicator on various container types, and to detect illegal reverse iterations on containers that only supoort forward iteration. From-SVN: r213431
2014-07-31[multiple changes]Arnaud Charlet1-7/+8
2014-07-31 Robert Dewar <dewar@adacore.com> * frontend.adb: Minor reformatting. * sem.adb: Minor reformatting. * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for identifiers on rewrite. * par.adb: Minor comment updates. * a-ngelfu.adb (Cos): Minor simplification. * par-ch13.adb (Get_Aspect_Specifications): Improve messages and recovery for bad aspect. * exp_ch3.adb: Code clean up. * sem_util.ads: Minor comment correction. * sem_ch13.adb (Check_Array_Type): Properly handle large types. * sem_ch3.adb: Code clean up. * binderr.ads: Minor comment correction. 2014-07-31 Ed Schonberg <schonberg@adacore.com> * exp_disp.adb (Expand_Interface_Conversion): A call whose prefix is a static conversion to an interface type that is not class-wide is not dispatching. From-SVN: r213338
2014-02-24sem_ch5.adb, [...]: Change spelling 'parametrization' to 'parameterization'.Gary Dismukes1-1/+1
2014-02-24 Gary Dismukes <dismukes@adacore.com> * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb, par-ch12.adb: Change spelling 'parametrization' to 'parameterization'. From-SVN: r208075
2014-02-19[multiple changes]Arnaud Charlet1-1/+1
2014-02-19 Robert Dewar <dewar@adacore.com> * par-ch6.adb (P_Return): For extended return, end column lines up with RETURN. * par.adb: Minor documentation clarification. 2014-02-19 Yannick Moy <moy@adacore.com> * sem_prag.adb (Check_Loop_Pragma_Placement): Add check that Loop_Invariant and Loop_Variant appear consecutively. * gnat_rm.texi Update documentation of Loop_Invariant and Loop_Variant pragmas. 2014-02-19 Robert Dewar <dewar@adacore.com> * debug.adb: Document -gnatd.X. * par-ch5.adb (P_If_Statement): Always check THEN, even if not first token (Check_Then_Column): Ditto. * styleg.adb (Check_Then): Allow THEN on line after IF. (Check_Then): Check THEN placement under control of -gnatd.X * styleg.ads (Check_Then): Now called even if THEN is not first token on line. * stylesw.ads (Style_Check_If_Then_Layout): Document new relaxed rules. * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF. 2014-02-19 Robert Dewar <dewar@adacore.com> * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb, a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb, prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb, vms_conv.adb: Fix bad layout of IF statements From-SVN: r207893
2014-02-19[multiple changes]Arnaud Charlet1-13/+18
2014-02-19 Robert Dewar <dewar@adacore.com> * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration (Expand_Min_Max_Attribute): Use Matching_Standard_Type. * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special handling for the case of Modify_Tree_For_C, this approach did not work. * exp_util.adb (Matching_Standard_Type): New function (Side_Effect_Free): New top level functions (from Remove_Side_Effects). * exp_util.ads (Side_Effect_Free): New top level functions (moved from body). * sinfo.ads: Minor comment updates. 2014-02-19 Ed Schonberg <schonberg@adacore.com> * exp_ch6.adb (Expand_Simple_Function_Return): If return type is unconstrained and uses the secondary stack, mark the enclosing function accordingly, to ensure that the value is not prematurely removed. 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com> * par.adb Alphabetize the routines in Par.Sync. (Resync_Past_Malformed_Aspect): New routine. * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local variables. Code and comment reformatting. Detect missing parentheses on aspects [Refined_]Global and [Refined_]Depends with a non-null definition. * par-sync.adb: Alphabetize all routines in this separate unit. (Resync_Past_Malformed_Aspect): New routine. From-SVN: r207890
2014-01-29a-except-2005.adb, [...]: Minor reformatting.Robert Dewar1-3/+3
2014-01-29 Robert Dewar <dewar@adacore.com> * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb, ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads, a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads, a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb, atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb, a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb, cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb, eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb, freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb, gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads, krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads, live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb, par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb, par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb, rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads, sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb, sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb, s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads, sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb, s-regpat.adb, s-secsta.adb, s-stalib.ads, s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb, s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb, s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads, system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb, urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting. From-SVN: r207260
2014-01-27[multiple changes]Arnaud Charlet1-0/+60
2014-01-27 Thomas Quinot <quinot@adacore.com> * exp_ch7.adb: Minor reformatting. 2014-01-27 Robert Dewar <dewar@adacore.com> * opt.adb (SPARK_Mode): Default for library units is None rather than Off. * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is no longer ordered. * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO possibility. * snames.ads-tmpl (Name_Auto): Removed, no longer used. 2014-01-27 Robert Dewar <dewar@adacore.com> * par-ch5.adb (P_Sequence_Of_Statements): Make entry in Suspicious_Labels table if we have identifier; followed by loop or block. * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table. * par.adb (Suspicious_Labels): New table. 2014-01-27 Robert Dewar <dewar@adacore.com> * exp_aggr.adb (Check_Bounds): Reason is range check, not length check. 2014-01-27 Yannick Moy <moy@adacore.com> * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for reference. * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless function now. (Add_SPARK_Xrefs): Include references to constants. * spark_xrefs.ads Document new character 'c' for references to constants. 2014-01-27 Thomas Quinot <quinot@adacore.com> * exp_smem.adb (Add_Write_After): For a function call, insert write as an after action in a transient scope. From-SVN: r207140
2014-01-21[multiple changes]Arnaud Charlet1-1/+7
2014-01-21 Robert Dewar <dewar@adacore.com> * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery. * par-ch5.adb (P_Condition): New version with expression prescanned. * par.adb (P_Condition): New version with expression prescanned. 2014-01-21 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Document that Allow_Integer_Address is ignored if Address is not a private type. * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address): Ignore pragma if System.Address is not a private type. 2014-01-21 Arnaud Charlet <charlet@adacore.com> * namet.ads (Name_Len): Initialize to 0 to avoid accessing an uninitialized value. From-SVN: r206892
2013-04-11exp_ch11.ads, [...] (Expand_N_Raise_Expression): New procedure.Robert Dewar1-1/+2
2013-04-11 Robert Dewar <dewar@adacore.com> * exp_ch11.ads, exp_ch11.adb (Expand_N_Raise_Expression): New procedure. * exp_util.adb (Insert_Actions): Add entry for N_Raise_Expression. * expander.adb: Add call to Expand_N_Raise_Expression. * par-ch11.adb (P_Raise_Expression): New procedure. * par-ch4.adb (P_Relation): Handle Raise_Expression. * par.adb (P_Raise_Expression): New procedure. * sem.adb: Add handling for N_Raise_Expression. * sem_ch11.ads, sem_ch11.adb (Analyze_Raise_Expression): New procedure. * sem_res.adb (Resolve): Add handling for N_Raise_Expression. * sinfo.ads, sinfo.adb (N_Raise_Expression): New node. * sprint.adb (Sprint_Node_Actual): Add handling for N_Raise_Expression. * stand.ads (Any_Type): Document use with N_Raise_Expression. From-SVN: r197764
2012-10-29[multiple changes]Arnaud Charlet1-2/+11
2012-10-29 Arnaud Charlet <charlet@adacore.com> * warnsw.adb (Set_GNAT_Mode_Warnings): Unset Warn_On_Standard_Redefinition. 2012-10-29 Javier Miranda <miranda@adacore.com> * sem_ch3.adb (Derive_Progenitor_Subprograms): Complete documentation. 2012-10-29 Robert Dewar <dewar@adacore.com> * par-ch11.adb (Warn_If_Standard_Redefinition): Add calls. * par-ch3.adb (P_Defining_Identifier): Call Warn_If_Standard_Redefinition if not inside record definition. * par-ch6.adb (Warn_If_Standard_Redefinition): Add calls. * par-util.adb (Warn_If_Standard_Redefinition): New procedure. * par.adb (Inside_Record_Definition): New flag. (Warn_If_Standard_Redefinition): New procedure. * sinfo-cn.adb (Change_Identifier_To_Defining_Identifier): Remove handling of warning for redefining standard name (moved to Par*). From-SVN: r192927
2012-10-02par_sco.adb, [...]: Change name Conditional_Expression to If_Expression.Robert Dewar1-9/+9
2012-10-02 Robert Dewar <dewar@adacore.com> * par_sco.adb, sem_ch3.adb, layout.adb, exp_ch7.adb, exp_imgv.adb, exp_util.adb, exp_util.ads, exp_attr.adb, sinfo.adb, sinfo.ads, exp_ch9.adb, style.ads, scos.ads, debug.adb, einfo.ads, scng.adb, checks.adb, checks.ads, sem.adb, par-ch4.adb, sem_util.adb, types.h, sem_res.adb, expander.adb, scans.ads, par.adb, exp_ch2.adb, gnat1drv.adb, stylesw.ads, sem_elab.adb, exp_ch4.adb, exp_ch4.ads, exp_ch6.adb, sem_ch4.adb, sem_ch4.ads, sem_ch6.adb, opt.ads, sem_eval.adb, sem_eval.ads, exp_intr.adb, sprint.adb, sprint.ads, styleg.ads: Change name Conditional_Expression to If_Expression. * gcc-interface/trans.c (gnat_to_gnu): Replace N_Conditional_Expression by N_If_Expression. * gcc-interface/Make-lang.in: Update dependencies. From-SVN: r191967
2012-07-23[multiple changes]Arnaud Charlet1-1/+7
2012-07-23 Vincent Celier <celier@adacore.com> * g-spitbo.adb (Substr (String)): Return full string and do not raise exception when Start is 1 and Len is exactly the length of the string parameter. * g-spitbo.ads: Fix spelling error in the name of exception Index_Error. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * par.adb: new subprogram Get_Aspect_Specifications. * par-ch6.adb (P_Subprogram): handle subprogram bodies with aspect specifications. * par-ch13.adb (Get_Aspect_Specifications): extracted from P_Aspect_Specifications. Collect aspect specifications in some legal context, but do not attach them to any declaration. Used when parsing subprogram declarations or bodies that include aspect specifications. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If aspects are present, analyze them, or reject them if the subprogram as a previous spec. 2012-07-23 Vasiliy Fofanov <fofanov@adacore.com> * gnat_ugn.texi: Omit section on other platforms/runtimes support in gnattest for vms version. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Handle properly aspects that can be specified on a subprogram body: CPU, Priority, and Interrupt_Priority. 2012-07-23 Claire Dross <dross@adacore.com> * a-cfdlli.ads: Switch definition of Constant_Reference_Type and Empty_List. 2012-07-23 Thomas Quinot <quinot@adacore.com> * par_sco.adb (Process_Decisions.Output_Header): For the guard on an alternative in a SELECT statement, use the First_Sloc of the guard expression (not its topmost sloc) as the decision location, because this is what is referenced by dominance markers. 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Requires_Hooking): Examine the original expression of an object declaration node because a function call that returns on the secondary stack may have been rewritten into something else. 2012-07-23 Vincent Pucci <pucci@adacore.com> * sem_dim.adb (Analyze_Dimension_Has_Etype): For identifier, propagate dimension when entity is a non-dimensionless constant. (Analyze_Dimension_Object_Declaration): Propagate dimension from the expression to the entity when type is a dimensioned type and object is a constant. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Analyze_Attribute, case 'Old): if the prefix is not an entity name, expand at once so that code generated by the expansion of the prefix is not generated before the constant that captures the old value is properly inserted and analyzed. 2012-07-23 Thomas Quinot <quinot@adacore.com> * exp_ch9.adb (Ensure_Statement_Present): Mark generated NULL statement as Comes_From_Source so that GIGI does not eliminate it. From-SVN: r189773
2011-12-21[multiple changes]Arnaud Charlet1-1/+1
2011-12-21 Yannick Moy <moy@adacore.com> * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not ignore representation attributes in Alfa mode, since formal verification backend does not depend on actual physical representation, but code may still refer to attribute values. 2011-12-21 Yannick Moy <moy@adacore.com> * par-ch13.adb (P_Aspect_Specifications): Recognize the cases where a comma between two aspects is missing, or erroneously replaced by a semicolon, issue an error and proceed with next aspect. * par.adb, sinfo.ads: Fix typos. 2011-12-21 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Mark_Coextensions): A coextension for an object that is part of the expression in a return statement, or part of the return object in an extended return statement, must be allocated dynamically. From-SVN: r182585
2011-10-13[multiple changes]Arnaud Charlet1-0/+5
2011-10-13 Thomas Quinot <quinot@adacore.com> * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb (Check_Future_Identifier): New subprogram, factors duplicated code from Par.Ch2.P_Identifier and Par.Ch3.P_Defining_Identifier. 2011-10-13 Thomas Quinot <quinot@adacore.com> * s-taprop-posix.adb (Initialize): Always raise Storage_Error if we fail to initialize CV attributes or CV. 2011-10-13 Thomas Quinot <quinot@adacore.com> * s-tasren.adb (Timed_Selective_Wait, case Accept_Alternative_Selected): Use Defer_Abort_Nestable, since we know abortion is already deferred. 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9. (Build_Master_Renaming (function)): Removed. (Build_Master_Renaming (procedure)): Moved to exp_ch9. (Expand_Full_Type_Declaration): Alphabetize variables. Reformatting of code and comments. Rewrite the section on processing of anonymous access-to-task types in record components. * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9. (Build_Master_Renaming): Moved to exp_ch9. * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3. (Build_Master_Entity): Add formal parameter Use_Current. Reformatting of code and comments. (Build_Master_Renaming): Moved from exp_ch3. * exp_ch9.ads (Build_Class_Wide_Master): Moved from exp_ch3. Update comment on usage. (Build_Master_Entity): Add formal parameter Use_Current. Update comment on usage. (Build_Master_Renaming): Moved from exp_ch3. * sem_ch3.adb (Access_Definition): Remove redundant code to create a _master and a renaming. 2011-10-13 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb: Do no emit reference to overridden operation, if it is internally generated. 2011-10-13 Vincent Celier <celier@adacore.com> * bindgen.adb: Remove any processing related to g-trasym * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS * mlib-prj.adb: Remove any processing related to g-trasym. From-SVN: r179898
2011-09-05sem_ch3.adb, [...]: Minor reformatting.Robert Dewar1-3/+5
2011-09-05 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb, exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting. From-SVN: r178536
2011-09-05[multiple changes]Arnaud Charlet1-7/+14
2011-09-05 Johannes Kanig <kanig@adacore.com> * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect information. 2011-09-05 Ed Schonberg <schonberg@adacore.com> * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram appears within a package specification and the token after "IS" is not a parenthesis, assume that this is an unparenthesized expression function, even if the token appears in a line by itself. * par.adb: Clarify use of Labl field of scope stack in error recovery. From-SVN: r178532
2011-08-30[multiple changes]Arnaud Charlet1-2/+8
2011-08-30 Jose Ruiz <ruiz@adacore.com> * s-taskin.ads (Common_ATCB): Add field domain which contains the dispatching domain to which the task belongs. * s-taskin.adb (Initialize): Create the default system dispatching domain and make the environment task part of it. * s-mudido.ads: Add this new spec for standard Ada 2012 package Ada.Multiprocessors.Dispatching_Domains. * s-mudido.adb: Add this new body for targets not supporting dispatching domains. * s-mudido-affinity.adb: Add this new body for targets supporting dispatching domains setting the affinity to a CPU set. * bindgen.adb (Dispatching_Domain_Used, Check_Dispatching_Domains_Used, Gen_Adainit): When package System.Multiprocessors.Dispatching_Domains is used we call the procedure to signal that when we are about to call the main subprogram no new dispatching domain can be created. (Check_File_In_Partition): Factor out the common functionality used by Check_System_Restrictions_Used and Check_Dispatching_Domains_Used. * s-tassta.adb (Create_Task): Tasks inherit the dispatching domain of their activators. * s-taprop.ads (Set_Task_Affinity): Add this new procedure to set task affinities. * s-taprop-dummy.adb, s-taprop-hpux-dce.adb, s-taprop-irix.adb, s-taprop-posix.adb, s-taprop-tru64.adb, s-taprop-vms.adb (Set_Task_Affinity): Dummy null body for these targets not supporting task affinities. s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb (Create_Task, Enter_Task, Initialize): Handle dispatching domains and set the affinity of the environment task. (Set_Task_Affinity): Procedure that uses the underlying CPU set functionality to handle dispatching domains, pragma CPU and Task_Info. s-winext.ads (SetThreadAffinityMask): Import this function needed to set CPU masks. * s-osinte-solaris.ads (psetit_t, pset_create, pset_assign, pset_bind): Import the functionality to handle CPU set affinities. * affinity.c: New file. * s-osinte-vxworks.ads, s-vxwext.ads, s-vxwext-kernel.ads, s-vxwext-rtp.ads (taskMaskAffinitySet): Add this new spec for setting affinity masks. * s-vxwext.adb, s-vxwext-kernel.adb, s-vxwext-rtp.adb (taskMaskAffinitySet): Body returning an error indicating that task affinities are not supported. Makefile.rtl: Indicate that s-mudido is part of libgnarl. * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for VxWorks SMP, Solaris, Windows, and {x86,PowerPC, ia64,x86_64} Linux): Use the s-mudido-affinity.adb body which supports task affinities. 2011-08-30 Thomas quinot <quinot@adacore.com> * sem_ch13.adb: Minor reformatting. 2011-08-30 Vincent Celier <celier@adacore.com> * vms_conv.adb (Process_Argument): When the qualifier /UNCHECKED_SHARED_LIB_IMPORTS is for GNAT COMPILE, do not put the corresponding switch --unchecked-shared-lib-imports after -cargs, as it is for gnatmake, not for the compiler. 2011-08-30 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Quantified_Expression): Analyze iterator specification and condition only in Semantics_Only mode. Otherwise the analysis is done after expression has been rewritten as loop. * sem_ch5.adb (Analyze_Iterator_Specification): Always generate a temporary for the iterator name (the domain of iteration) because it may need finalization actions and these must be generated outside of the loop. * sem_res.adb (Resolve_Quantified_Expression): Resolve only in Semantic_Only mode. * exp_ch4.adb (Expand_Quantified_Expression): Analyze and resolve once rewritten as loop. * exp_ch5.adb (Expand_Iterator_Loop): Code clean-up, now that the iterator is always an expression. 2011-08-30 Robert Dewar <dewar@adacore.com> * par-ch4.adb (P_Unparen_Cond_Case_Quant_Expression): New function (P_Expression_If_OK): New spec checks parens (P_Expression_Or_Range_Attribute_If_OK): New spec checks parens * par.adb (P_Expression_If_OK): New spec checks parens (P_Expression_Or_Range_Attribute_If_OK): New spec checks parens From-SVN: r178321
2011-08-04[multiple changes]Arnaud Charlet1-2/+2
2011-08-04 Yannick Moy <moy@adacore.com> * par-ch13.adb (Aspect_Specifications_Present): recognize "with Identifier'Class =>" as an aspect, so that a meaningful warning is issued in Strict mode. * par.adb: Fix typos in comments. 2011-08-04 Yannick Moy <moy@adacore.com> * sem_attr.adb (Result): modify error message to take into account Post aspect when compiling Ada 2012 (or newer) code. 2011-08-04 Nicolas Roche <roche@adacore.com> * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to remove need for GCC exceptions. 2011-08-04 Vincent Celier <celier@adacore.com> * makeutl.adb (Do_Complete): Call Debug_Output with the name of the project, not the source file name. * prj.adb (Find_Sources.Look_For_Sources): If the source has been excluded, continue looking. This excluded source will only be returned if there is no other source with the same base name that is not locally removed. 2011-08-04 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is private and one of the operands is a real literal, use a qualified expression rather than a conversion which is not meaningful to the back-end. From-SVN: r177342
2011-08-04[multiple changes]Arnaud Charlet1-5/+1
2011-08-04 Tristan Gingold <gingold@adacore.com> * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset instead of the locally imported procedure. * s-taprop-mingw.adb (Enter_Task): Ditto. * s-valrea.adb (Scan_Real): Ditto. * s-imgrea.adb (Set_Image_Real): Ditto. * s-flocon.ads: Make the package pure. 2011-08-04 Thomas Quinot <quinot@adacore.com> * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove. * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly. * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement): New subprogram, moved here from... * par.adb, par-ch5.adb (P_Statement_Name): ... here. * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any rewriting of the last argument into a procedure call statement here... * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there instead. 2011-08-04 Thomas Quinot <quinot@adacore.com> * par_sco.adb: Minor reformatting. From-SVN: r177337
2011-08-02[multiple changes]Arnaud Charlet1-0/+1
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-02[multiple changes]Arnaud Charlet1-0/+1
2011-08-02 Robert Dewar <dewar@adacore.com> * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table (Base_Type): Now uses improved Is_Base_Type function * einfo.ads (Base_Type): Inline this function 2011-08-02 Robert Dewar <dewar@adacore.com> * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas 2011-08-02 Arnaud Charlet <charlet@adacore.com> * gcc-interface/Make-lang.in: Update dependencies. * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks targets. 2011-08-02 Yannick Moy <moy@adacore.com> * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on non-simple expression used in delta constraint (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on index constraint which is not a subtype mark * par.adb: With and use Restrict * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal mode on component type which is not a subtype mark and default expression on component (Analyze_Subtype_Declaration): issue an error in formal mode on subtype of string which does not have a lower index bound equal to 1 (Array_Type_Declaration): issue an error in formal mode on index or component type which is not a subtype mark, and on aliased keyword on component (Derived_Type_Declaration): issue an error in formal mode on interface, limited or abstract type (Record_Type_Declaration): issue an error in formal mode on interface (Record_Type_Definition): issue an error in formal mode on tagged types and type extensions not declared in the specification of a library unit package; on null non-tagged record; on variant part 2011-08-02 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir not declared for qualified library project when Library_Name is not declared, but Library_Dir is. 2011-08-02 Robert Dewar <dewar@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated pragmas (affects aspects [Component_]Default_Value (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use component type for the resolution From-SVN: r177123
2011-08-02[multiple changes]Arnaud Charlet1-8/+30
2011-08-02 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Minor reformatting. * sem_prag.adb: Minor reformatting. 2011-08-02 Tristan Gingold <gingold@adacore.com> * vms_data.ads: Add VMS qualifier for -gnateP. 2011-08-02 Robert Dewar <dewar@adacore.com> * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty * par-ch7.adb (P_Package): Proper placement of aspects for package decl/instantiation. * par-endh.adb (Check_End): Ad Is_Sloc parameter (End_Statements): Add Is_Sloc parameterr * par.adb (P_Aspect_Specification): New meaning of Decl = Empty (Check_End): Ad Is_Sloc parameter (End_Statements): Add Is_Sloc parameterr 2011-08-02 Vincent Celier <celier@adacore.com> * ug_words: Add VMS qualifier equivalent to -gnateP: /SYMBOL_PREPROCESSING. 2011-08-02 Jose Ruiz <ruiz@adacore.com> * gnat-style.texi: For hexadecimal numeric literals the typical grouping of digits is 4 to represent 2 bytes. A procedure spec which is split into several lines is indented two characters. 2011-08-02 Yannick Moy <moy@adacore.com> * exp_aggr.adb (Is_Others_Aggregate): move function to other unit. * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here (Resolve_Aggregate): issue errors in formal modes when aggregate is not properly qualified (Resolve_Array_Aggregate): issue errors in formal modes on non-static choice in array aggregate (Resolve_Extension_Aggregate): issue errors in formal modes on subtype mark as ancestor (Resolve_Record_Aggregate): issue errors in formal modes on mixed positional and named aggregate for record, or others in record aggregate, or multiple choice in record aggregate * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when array operands to logical operations AND, OR and XOR do not have the same static lower and higher bounds * sem_ch5.adb, sinfo.ads: Correct typos in comments From-SVN: r177086
2011-08-01sem_util.ads, [...] (Last_Source_Statement): Replaces ↵Robert Dewar1-4/+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-01err_vars.ads (Error_Msg_Lang, [...]): new variables for insertion character ~~Yannick Moy1-0/+4
2011-08-01 Yannick Moy <moy@adacore.com> * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for insertion character ~~ * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures (Set_Error_Msg_Lang): new procedure which fixes the language for use with insertion character ~~ (Set_Msg_Text): treat insertion character ~~ * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to Formal_Error_Msg_... procedures by equivalent Error_Msg_... procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make errors related to the formal language restriction not serious (insertion character |). * par.adb (Par): set formal language for error messages if needed * sem_ch6.adb (Check_Missing_Return): take into account possible generated statements at the end of the function * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and enumeration value to define a new pragma SPARK_95 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default, SPARK_Version): new type and variables to store the SPARK version (none by default). (SPARK_Mode): return True when SPARK_Version is set * par-prag.adb: Correct indentation (Prag): take Pragma_SPARK_95 into account * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95 into account. From-SVN: r177056
2011-08-01[multiple changes]Arnaud Charlet1-4/+0
2011-08-01 Yannick Moy <moy@adacore.com> * sem_util.ads, sem_util.adb, par.adb, par_util.adb (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move procedures out of these packages. * errout.ads, errout.adb (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move procedures in of this package (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode on misplaced later vs initial declarations, like in Ada 83 * sem_attr.adb (Processing for Analyze_Attribute): issue error in formal mode on attribute of private type whose full type declaration is not visible * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a package declaration inside a package specification (Analyze_Full_Type_Declaration): issue error in formal mode on controlled type or discriminant type * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on user-defined operator means that it should come from the source (New_Overloaded_Entity): issue error in formal mode on overloaded entity. * sem_ch6.ads, sem_ch13.ads: typos in comments. 2011-08-01 Thomas Quinot <quinot@adacore.com> * atree.adb: Minor reformatting. * checks.adb: Minor reformatting. From-SVN: r177052
2011-08-01par-endh.adb (Check_End): issue a syntax error in SPARK mode for missing ↵Yannick Moy1-0/+4
label at end of declaration... 2011-08-01 Yannick Moy <moy@adacore.com> * par-endh.adb (Check_End): issue a syntax error in SPARK mode for missing label at end of declaration (subprogram or package) * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing of positional and named parameter association * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on Error_Msg_SP which adds a prefix to the error message giving the name of the formal language analyzed * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for access result type in subprogram, unconstrained array as result type,. (Analyze_Subprogram_Declaration): issue an error in formal mode for null procedure * sem_ch8.adb: Code clean up. From-SVN: r177048
2011-08-01[multiple changes]Arnaud Charlet1-19/+26
2011-08-01 Robert Dewar <dewar@adacore.com> * par-endh.adb: Minor reformatting. 2011-08-01 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Add aspects for library unit pragmas (Pre_Post_Aspects): New subtype. * par-ch12.adb (P_Generic): New syntax for aspects in packages * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter * par-ch7.adb (P_Package): Remove Decl parameter (P_Package): Handle new syntax for aspects (before IS) * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle new aspect syntax (P_Task_Definition): Remove Decl parameter, handle new aspect syntax * par.adb (P_Aspect_Specifications): Add Semicolon parameter (P_Package): Remove Decl parameter * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit aspects * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect specs * sem_util.ads, sem_util.adb (Static_Boolean): New function * sinfo.ads: Document new syntax for aspects in packages etc. * sprint.adb: Handle new syntax of aspects before IS in package 2011-08-01 Thomas Quinot <quinot@adacore.com> * atree.ads: Minor reformatting. * sem_prag.adb: Minor reformatting. 2011-08-01 Robert Dewar <dewar@adacore.com> * exp_util.adb (Insert_Actions): Fix error in handling Actions for case expr alternative. 2011-08-01 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb: Fix typo. From-SVN: r177027
2011-08-01[multiple changes]Arnaud Charlet1-0/+1
2011-08-01 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec. * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name. * par.adb: Add with for Namet.Sp. * par-tchk.adb: Minor reformatting. 2011-08-01 Vincent Celier <celier@adacore.com> * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name of the init procedure of a SAL. * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name): New procedure. 2011-08-01 Thomas Quinot <quinot@adacore.com> * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor reformatting. 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * adaint.c (__gnat_file_time_name_attr): Get rid of warning. 2011-08-01 Thomas Quinot <quinot@adacore.com> * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function conformant with its spec (return True only for types that have an overriding Initialize primitive operation that prevents them from having preelaborable initialization). * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable initialization for controlled types in Ada 2005 or later mode. From-SVN: r177021
2010-12-20Fix typos in gcc/ada.Ralf Wildenhues1-4/+4
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-26[multiple changes]Arnaud Charlet1-2/+9
2010-10-26 Robert Dewar <dewar@adacore.com> * exp_ch3.adb: Fix typo, comment updates. * namet.adb: Minor comment additions. * einfo.ads: Minor comment update. 2010-10-26 Javier Miranda <miranda@adacore.com> * einfo.adb (Set_Dispatch_Table_Wrappers): Complete the assertion. 2010-10-26 Robert Dewar <dewar@adacore.com> * par.adb, par-ch13.adb (Aspect_Specifications_Present): Add Strict parameter. From-SVN: r165955
2010-10-19[multiple changes]Arnaud Charlet1-0/+7
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-12[multiple changes]Arnaud Charlet1-5/+21
2010-10-12 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb (Move_Aspects): New procedure. * atree.ads, atree.adb: (New_Copy): Does not copy aspect specifications * sinfo.ads, par-ch3.adb, par-ch6.adb, par-ch7.adb, par-ch9.adb, par-endh.adb, par-ch13.adb, par-ch12.adb: Modify grammar to include aspect specifications. Recognize aspect specifications for all cases * par.adb: Recognize aspect specifications for all cases * sem_ch12.ads, sem_ch12.adb (Copy_Generic_Node): Copies aspect specifications. * sem_ch3.adb (Analyze_Subtype_Declaration): Improve patch to freeze generic actual types (was missing some guards before). * sem_ch9.adb (Analyze_Single_Protected_Declaration): Copy aspects to generated object (Analyze_Single_Task_Declaration): Copy aspects to generated object 2010-10-12 Eric Botcazou <ebotcazou@adacore.com> * usage.adb (usage): Adjust line for -gnatn switch. 2010-10-12 Robert Dewar <dewar@adacore.com> * sem_attr.adb (Eval_Attribute): Only leave change active for aspect spec case. 2010-10-12 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Declaration): If this is a declaration of a null procedure resolve the types of the profile of the generated null body now. From-SVN: r165353
2010-10-11[multiple changes]Arnaud Charlet1-0/+20
2010-10-11 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Major revision of this package for 2nd stage of aspects implementation. * gcc-interface/Make-lang.in: Add entry for aspects.o * gcc-interface/Makefile.in: Add aspects.o to GNATMAKE_OBJS * par-ch13.adb (Aspect_Specifications_Present): New function (P_Aspect_Specifications): New procedure * par-ch3.adb (P_Type_Declaration): Handle aspect specifications (P_Derived_Type_Def_Or_Private_Ext_Decl): Handle aspect specifications (P_Identifier_Declarations): Handle aspect specifications (P_Component_Items): Handle aspect specifications (P_Subtype_Declaration): Handle aspect specifications * par-ch6.adb (P_Subprogram): Handle aspect specifications * par-ch9.adb (P_Entry_Declaration): Handle aspect specifications * par.adb (Aspect_Specifications_Present): New function (P_Aspect_Specifications): New procedure * sem.adb (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. (Analyze_Formal_Package_Declaration): New name (add _Declaration) (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration) (Analyze_Protected_Type_Declaration): New name (add _Declaration) (Analyze_Single_Protected_Declaration): New name (add _Declaration) (Analyze_Single_Task_Declaration): New name (add _Declaration) (Analyze_Task_Type_Declaration): New name (add _Declaration) * sem_cat.adb (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. * sem_ch11.adb (Analyze_Exception_Declaration): Analyze aspect specifications. * sem_ch12.adb (Analyze_Formal_Object_Declaration): Handle aspect specifications. (Analyze_Formal_Package_Declaration): New name (add _Declaration) (Analyze_Formal_Package_Declaration): Handle aspect specifications (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration) (Analyze_Formal_Subprogram_Declaration): Handle aspect specifications (Analyze_Formal_Type_Declaration): Handle aspect specifications (Analyze_Generic_Package_Declaration): Handle aspect specifications (Analyze_Generic_Subprogram_Declaration): Handle aspect specifications (Analyze_Package_Instantiation): Handle aspect specifications (Analyze_Subprogram_Instantiation): Handle aspect specifications * sem_ch12.ads (Analyze_Formal_Package_Declaration): New name (add _Declaration). (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration) * sem_ch13.adb (Analyze_Aspect_Specifications): New procedure (Duplicate_Clause): New function, calls to this function are added to processing for all aspects. * sem_ch13.ads (Analyze_Aspect_Specifications): New procedure * sem_ch3.adb (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. * sem_ch3.ads (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Analyze aspect specifications. (Analyze_Subprogram_Declaration): Analyze aspect specifications * sem_ch7.adb (Analyze_Package_Declaration): Analyze aspect specifications. (Analyze_Private_Type_Declaration): Analyze aspect specifications * sem_ch9.adb (Analyze_Protected_Type_Declaration): Analyze aspect specifications. (Analyze_Protected_Type_Declaration): New name (add _Declaration) (Analyze_Single_Protected_Declaration): Analyze aspect specifications (Analyze_Single_Protected_Declaration): New name (add _Declaration) (Analyze_Single_Task_Declaration): Analyze aspect specifications (Analyze_Single_Task_Declaration): New name (add _Declaration) (Analyze_Task_Type_Declaration): Analyze aspect specifications (Analyze_Task_Type_Declaration): New name (add _Declaration) * sem_ch9.ads (Analyze_Protected_Type_Declaration): New name (add _Declaration). (Analyze_Single_Protected_Declaration): New name (add _Declaration) (Analyze_Single_Task_Declaration): New name (add _Declaration) (Analyze_Task_Type_Declaration): New name (add _Declaration) * sem_prag.adb: Use Get_Pragma_Arg systematically so that we do not have to generate unnecessary pragma argument associations (this matches the doc). Throughout do changes to accomodate aspect specifications, including specializing messages, handling the case of not going through all homonyms, and allowing for cancellation. * sinfo.ads, sinfo.adb: Clean up obsolete documentation for Flag1,2,3 (Aspect_Cancel): New flag (From_Aspect_Specification): New flag (First_Aspect): Removed flag (Last_Aspect): Removed flag * sprint.adb (Sprint_Aspect_Specifications): New procedure (Sprint_Node_Actual): Add calls to Sprint_Aspect_Specifications 2010-10-11 Bob Duff <duff@adacore.com> * sem_res.adb (Resolve_Actuals): Minor change to warning messages so they match in Ada 95, 2005, and 2012 modes, in the case where the language didn't change. Same thing for the run-time exception message. 2010-10-11 Javier Miranda <miranda@adacore.com> * debug.adb Document that switch -gnatd.p enables the CIL verifier. 2010-10-11 Robert Dewar <dewar@adacore.com> * s-htable.adb: Minor reformatting. From-SVN: r165299
2010-10-11[multiple changes]Arnaud Charlet1-8/+8
2010-10-11 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Entry_Call): Generate 's' reference for entry call. * sem_ch6.adb: Diagnose additional error condition. 2010-10-11 Bob Duff <duff@adacore.com> * par.adb (Par): Clarify wording of certain error messages. From-SVN: r165286
2010-10-07[multiple changes]Arnaud Charlet1-13/+13
2010-10-07 Robert Dewar <dewar@adacore.com> * par-ch3.adb, par-ch6.adb, par-ch7.adb, par-ch9.adb, par-ch10.adb: Add Pexp to Pf_Rec constants (P_Subprogram): Expression is always enclosed in parentheses * par.adb (Pf_Rec): add Pexp flag for parametrized expression * sinfo.ads (N_Parametrized_Expression): Expression must be in parens 2010-10-07 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Specification): Implement Ada2012 checks on functions that return an abstract type or have a controlling result whose designated type is an abstract type. (Check_Private_Overriding): Implement Ada2012 checks on functions declared in the private part, if an abstract type is involved. * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): In Ada2012, reject a generic function that returns an abstract type. * exp_ch5.adb (Expand_Simple_Function_Return): in Ada2012, if a function has a controlling access result, check that the tag of the return value matches the designated type of the return expression. From-SVN: r165100
2010-10-07[multiple changes]Arnaud Charlet1-6/+6
2010-10-07 Robert Dewar <dewar@adacore.com> * scng.adb (Skip_Other_Format_Characters): New procedure (Start_Of_Wide_Character): New procedure (Scan): Use Start_Of_Wide_Character where appropriate (Scan): Improve error message for other_format chars in identifier (Scan): Allow other_format chars between tokens 2010-10-07 Javier Miranda <miranda@adacore.com> * exp_util.adb (Safe_Prefixed_Reference): When removing side effects, Add missing support for explicit dereferences. 2010-10-07 Robert Dewar <dewar@adacore.com> * par-ch10.adb, par-ch3.adb, par.adb: Minor reformatting. From-SVN: r165097