aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch4.adb
AgeCommit message (Collapse)AuthorFilesLines
2018-05-22[Ada] Ada2020: Reduction expressionsEd Schonberg1-231/+23
This patch dismantles the prototype implementation of the first proposal for Reduction expressions, one of the important potentially parallel constructs for Ada2020. The ARG is going in a different direction with a simpler syntax. 2018-05-22 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention of N_Reduction_Expression and N_Reduction_Expression_Parameter. * par-ch4.adb: Remove parsing routines for reduction expressions. * sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb, sem_spark.adb, sprint.adb: Remove analysis routines for reduction expressions. From-SVN: r260524
2018-01-11[Ada] Bump copyright notices to 2018Arnaud Charlet1-1/+1
2018-01-11 Arnaud Charlet <charlet@adacore.com> gcc/ada/ Bump copyright notices to 2018. From-SVN: r256519
2017-12-15exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Use Component_Size of the ↵Pierre-Marie de Rodat1-4/+4
innermost array instead of Esize of its component... gcc/ada/ 2017-12-15 Eric Botcazou <ebotcazou@adacore.com> * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Use Component_Size of the innermost array instead of Esize of its component type to exclude inappropriate array types, including packed array types. 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Input_Item): Allow concurrent types to appear within the input list of Initializes. Remove the uses of Input_OK. 2017-12-15 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_In): Do not replace a membership test on a scalar type with a validity test when the membership appears in a predicate expression, to prevent a spurious error when predicate is specified static. * sem_ch13.adb (Build_Predicate_Functions): Add warning if a static predicate, after constant-folding, reduces to True and is this redundant. * par-ch4.adb: Typo fixes and minor reformattings. 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * sem_elab.adb (Ensure_Prior_Elaboration_Static): Mark the generated with clause as being implicit for an instantiation in order to circumvent an issue with 'W' and 'Z' line encodings in ALI files. 2017-12-15 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Is_Potentially_Unevaluated): Detect further cases of misuse of 'Old that appear within an expression that is potentially unevaluated, when the prefix of the attribute does not statically designate an object (e.g. a function call). 2017-12-15 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Conformking_Types): Two incomplete types are conforming when one of them is used as a generic actual, but only within an instantiation. * einfo.ads: Clarify use of flag Used_As_Generic_Actual. 2017-12-15 Justin Squirek <squirek@adacore.com> * sem_attr.adb (Resolve_Attribute): Modify check for aliased view on prefix to use the prefix's original node to avoid looking at expanded conversions for certain array types. 2017-12-15 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Membership_Op): Add warning on a membership operation on a scalar type for which there is a user-defined equality operator. 2017-12-15 Yannick Moy <moy@adacore.com> * doc/gnat_rm/implementation_defined_pragmas.rst: Add Ghost assertion policy. gcc/testsuite/ 2017-12-15 Justin Squirek <squirek@adacore.com> * gnat.dg/aliasing4.adb: New testcase. 2017-12-15 Ed Schonberg <schonberg@adacore.com> * gnat.dg/incomplete6.adb, gnat.dg/incomplete6.ads: New testcase. 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * gnat.dg/initializes.ads, gnat.dg/initializes.adb: New testcase. 2017-12-15 Eric Botcazou <ebotcazou@adacore.com> * gnat.dg/component_size.adb: New testcase. From-SVN: r255695
2017-12-15[multiple changes]Pierre-Marie de Rodat1-20/+234
2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Initialization_Item): Remove the specialized processing for a null initialization item. Such an item is always illegal. 2017-12-15 Bob Duff <duff@adacore.com> * types.ads, types.h, libgnat/a-except.adb, exp_ch11.adb (PE_Build_In_Place_Mismatch): New reason code for raising when the BIPalloc formal parameter is incorrect. This can happen if a compiler bug causes a mismatch of build-in-place between caller and callee. * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use PE_Build_In_Place_Mismatch. 2017-12-15 Ed Schonberg <schonberg@adacore.com> * exp_ch4.ads, exp_ch4.adb (Expand_N_Reduction_Expression): New procedure. * exp_util.adb (Insert_Actions): Handle N_Reduction_Expression. * expander.adb (Expand): Call Expand_N_Reduction_Expression * par-ch4.adb (P_Reduction_Expression): New procedure. (P_Iterated_Component_Assoc_Or_Reduction): New precedure, extension of P_Iterated_Component_Association. (OK_Reduction_Expression_Parameter): New procedure. (P_Aggregate_Or_Paren_Expr): Improve error message for malformed delta aggregate. * sem.adb (Analyze): Call Analyze_Reduction_Expression and Analyze_Reduction_Expression_Parameter * sinfo.ads, sinfo.adb: New node kinds N_Reduction_Expression and N_Reduction_Expression_Parameter. * sem_ch4.ads, sem_ch4.adb (Analyze_Reduction_Expression, Analyze_Reduction_Expression_Parameter): New procedures. * sem_res.adb (Resolve): Handle Reduction_Expression and Reduction_Expression_Parameter * sem_spark.adb: Dummy entries for Reduction_Expression and Reduction_Expression_Parameter * sprint.adb (Sprint_Node_Actual): Print Reduction_Expression, Reduction_Expression_Parameter From-SVN: r255693
2017-09-08[multiple changes]Arnaud Charlet1-1/+1
2017-09-08 Gary Dismukes <dismukes@adacore.com> * par-ch4.adb: Reformatting of an error message. 2017-09-08 Javier Miranda <miranda@adacore.com> * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded identifiers to ensure their correct decoration of names on aspect expressions. 2017-09-08 Yannick Moy <moy@adacore.com> * exp_attr.adb (Expand_Loop_Entry_Attribute): Do not skip a loop coming from source which is rewritten into a loop. 2017-09-08 Ed Schonberg <schonberg@adacore.com> * freeze.adb (Wrap_Imported_Subprogram): Indicate that the wrapper has convention Ada, to prevent spurious warnings on unconstrained array parameters. 2017-09-08 Eric Botcazou <ebotcazou@adacore.com> * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma. (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise. 2017-09-08 Eric Botcazou <ebotcazou@adacore.com> * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id. From-SVN: r251884
2017-09-08[multiple changes]Arnaud Charlet1-0/+6
2017-09-08 Arnaud Charlet <charlet@adacore.com> * exp_intr.adb (Append_Entity_Name): Move to ... * sem_util.ads, sem_util.adb: ... here to share it. (Subprogram_Name): New subprogram, to compute the name of the enclosing subprogram/entity. * errutil.adb (Error_Msg): Fill new field Node. * erroutc.ads (Subprogram_Name_Ptr): New. (Error_Msg_Object): New field Node. * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account. * errout.adb (Error_Msg): New variant with node id parameter. Fill new parameter Node when emitting messages. Revert previous changes for Include_Subprogram_In_Messages. * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when generating warning message. 2017-09-08 Ed Schonberg <schonberg@adacore.com> * par-ch4.adb (P_Iterated_Component_Association): Place construct under -gnat2020 flag, given that it is a future feature of the language. * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark defining identifier as referenced to prevent spurious warnings: corresponding loop is expanded into one or more loops whose variable has the same name, and the expression uses those names and not the original one. From-SVN: r251883
2017-04-28exp_util.adb, [...]: Minor reformatting.Hristian Kirtchev1-1/+1
2017-04-28 Hristian Kirtchev <kirtchev@adacore.com> * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb, gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting. From-SVN: r247383
2017-04-27[multiple changes]Arnaud Charlet1-9/+35
2017-04-27 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the prefix can be an object reference in which case Obj'Image (X) can only be interpreted as an indexing of the parameterless version of the attribute. * par-ch4.adb (P_Name): An attribute reference can be the prefix of an indexing or a slice operation if the attribute does not require parameters. In Ada2012 'Image also belongs in this category, and A'Image (lo .. hi) is legal and must be parsed as a slice. 2017-04-27 Yannick Moy <moy@adacore.com> * exp_ch4.adb: Minor reformatting. * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode, disable the CodePeer and C generation modes. Similar to the opposite actions done in CodePeer mode. From-SVN: r247331
2017-04-25[multiple changes]Arnaud Charlet1-0/+4
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-04-25[multiple changes]Arnaud Charlet1-0/+14
2017-04-25 Bob Duff <duff@adacore.com> * s-osinte-linux.ads (pthread_mutexattr_setprotocol, pthread_mutexattr_setprioceiling): Add new interfaces for these pthread operations. * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set protocols as appropriate for Locking_Policy 'C' and 'I'. * s-taprop-posix.adb: Minor reformatting to make it more similar to s-taprop-linux.adb. 2017-04-25 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels): Handle properly a multi- level derivation involving both renamed and constrained parent discriminants, when the type to be constrained has fewer discriminants that the ultimate ancestor. 2017-04-25 Bob Duff <duff@adacore.com> * sem_util.adb (Is_Object_Reference): In the case of N_Explicit_Dereference, return False if it came from a conditional expression. 2017-04-25 Bob Duff <duff@adacore.com> * par-ch4.adb (P_Case_Expression): If a semicolon is followed by "when", assume that ";" was meant to be ",". From-SVN: r247139
2017-01-23[multiple changes]Arnaud Charlet1-4/+21
2017-01-23 Ed Schonberg <schonberg@adacore.com> * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta aggregate construct. (P_Record_Or_Array_Component_Association): An array aggregate can start with an Iterated_Component_Association. * scng.adb: Modify error message on improper use of @ in earlier versions of the language. * sinfo.ads: New node kind N_Delta_Aggregate. * sinfo.adb: An N_Delta_Aggregate has component associations and an expression. * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate. * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association): Create a new index for each one of the choices in the association, to prevent spurious homonyms in the scope. (Resolve_Delta_Aggregate): New. * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate. * exp_util.adb (Insert_Actions): Take into account N_Delta_Aggregate. * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate. * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate, and local procedures Expand_Delta_Array_Aggregate and expand_Delta_Record_Aggregate. * sprint.adb: Handle N_Delta_Aggregate. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an empty name when the exception declaration is subject to pragma Discard_Names. (Null_String): New routine. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * par-ch9.adb (P_Protected_Definition): Parse any optional and potentially illegal pragmas which appear in a protected operation declaration list. (P_Task_Items): Parse any optional and potentially illegal pragmas which appear in a task item list. From-SVN: r244794
2017-01-23[multiple changes]Arnaud Charlet1-6/+7
2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor reformatting. * exp_ch9.adb: minor style fix in comment. 2017-01-23 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived for a limited record extension with unknown discriminants whose full view has no discriminants. 2017-01-23 Yannick Moy <moy@adacore.com> * exp_spark.adb: Alphabetize with clauses. From-SVN: r244788
2017-01-23[multiple changes]Arnaud Charlet1-1/+1
2017-01-23 Gary Dismukes <dismukes@adacore.com> * a-calend.adb, prep.adb, debug.adb, prj.ads, prepcomp.adb, exp_disp.adb, s-imgrea.adb, g-socket.adb, g-socket.ads, sem_ch13.adb, prj-tree.ads: Minor spelling change for consistency (behaviour -> behavior). 2017-01-23 Ed Schonberg <schonberg@adacore.com> * scng.adb (Scan): Use Ada version Ada_2020 to flag use of Target_Name. * par-ch4.adb (P_Primary): Ditto. * opt.ads: Add Ada_2020 (optimistically) to enumeration list of Ada_Version_Type. * switch-c.adb (Scan_Front_End_Switches): Recognize -gnat2020 for new Ada version Ada_2020. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_Loop_Entry_Attribute): Force the generation of a nominal type for the constant which captures the value of the attribute prefix. Various clean ups. * sem_attr.adb (Analyze_Attribute): Clean up the processing of 'Loop_Entry. 2017-01-23 Yannick Moy <moy@adacore.com> * sem_util.adb (Has_Enabled_Property): Treat protected objects and variables differently from other variables. From-SVN: r244787
2017-01-23scans.ads: New token At_Sign.Ed Schonberg1-4/+19
2017-01-23 Ed Schonberg <schonberg@adacore.com> * scans.ads: New token At_Sign. Remove '@' from list of illegal characters for future version of the language. '@' is legal name. * scng.ads, scng.adb (Scan): Handle '@' appropriately. * scn.adb (Scan_Reserved_Identifier): An occurrence of '@' denotes a Target_Name. * par-ch4.adb (P_Name, P_Primary): Handle Target_Name. * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node. (Has_Target_Names): New flag on N_Assignment_Statement, to indicate that RHS has occurrences of N_Target_Name. * sem.adb: Call Analyze_Target_Name. * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram. (urrent_LHS): Global variable that denotes LHS of assignment, used in the analysis of Target_Name nodes. * sem_res.adb (Resolve_Target_Name): New procedure. * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125): N is an assignment statement whose RHS contains occurences of @ that designate the value of the LHS of the assignment. If the LHS is side-effect free the target names can be replaced with a copy of the LHS; otherwise the semantics of the assignment is described in terms of a procedure with an in-out parameter, and expanded as such. (Expand_N_Assignment_Statement): Call Expand_Assign_With_Target_Names when needed. * exp_util.adb (Insert_Actions): Take into account N_Target_Name. * sprint.adb: Handle N_Target_Name. From-SVN: r244783
2017-01-13[multiple changes]Arnaud Charlet1-3/+10
2017-01-13 Gary Dismukes <dismukes@adacore.com> * sem_ch13.adb: Minor reformatting and typo fix. 2017-01-13 Ed Schonberg <schonberg@adacore.com> * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An Iterated_Component_Association is a named association in an array aggregate. * sem_aggr.adb (Resolve_Iterated_Component_Association): New procedure, subsidiary of Resolve_Array_Aggregate, to analyze and resolve the discrete choices and the expression of the new construct. * sinfo.adb, sinfo.ads: In analogy with N_Component_Association, Loop_Actions and Box_Present are attributes of N_Iterated_Component_Association nodes. Box_Present is always False in this case. * sprint.adb (Sprint_Node): An Iterated_Component_Association has a Discrete_Choices list, as specified in the RM. A Component_Association for aggregate uses instead a Choices list. We have to live with this small inconsistency because the new construct also has a defining identifier, and there is no way to merge the two node structures. From-SVN: r244410
2017-01-13sem_aggr.adb, [...]: Update all eligible case statements to reflect the new ↵Hristian Kirtchev1-6/+8
style for case alternatives. 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com> * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb, exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb, layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb, exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb, exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb, g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb, sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb, prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb, a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb, get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb, g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb, sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb, s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb, contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb, g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb, g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb, a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb, ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb, get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb, prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb, exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb, s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb, a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb, a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb, g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb, par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb, uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb, a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case statements to reflect the new style for case alternatives. Various code clean up and reformatting. From-SVN: r244406
2017-01-13exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.Ed Schonberg1-18/+102
2017-01-13 Ed Schonberg <schonberg@adacore.com> * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association. * par-ch3.adb (P_Discrete_Choice_List): An Iterated_Component_Association is an array aggregate component. * par-ch4.adb (P_Iterated_Component_Association): New procedure. (Is_Quantified_Expression): New function that performs a lookahead to distinguish quantified expressions from iterated component associations. (P_Aggregate_Or_Paren_Expr): Recognize iterated component associations. (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto. * sem.adb (Analyze): Handle Iterated_Component_Association. * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated component associations. * sinfo.ads, sinfo.adb: Entries for for N_Iterated_Component_Association and its fields. * sprint.adb (Sprint_Node_Actual): Handle N_Iterated_Component_Association. From-SVN: r244403
2016-04-18[multiple changes]Arnaud Charlet1-2/+2
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com> * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting. 2016-04-18 Gary Dismukes <dismukes@adacore.com> * par-ch4.adb, sem_prag.adb: Minor reformatting. From-SVN: r235127
2014-10-20[multiple changes]Arnaud Charlet1-0/+42
2014-10-20 Tristan Gingold <gingold@adacore.com> * init.c (__gnat_is_stack_guard): Don't use mach_vm_region_recurse on arm-darwin. * raise-gcc.c: Add ATTRIBUTE_UNUSED to remove warnings for unused arguments. 2014-10-20 Hristian Kirtchev <kirtchev@adacore.com> * sem_attr.adb (Analyze_Attribute): Replace variables CS and PS with Proc_Id and Subp_Id to better illustrate their purpose. Account for the case where _Postconditions has not been generated yet and the context is aspect/pragma Refined_Post. In that scenario the expected prefix of attribute 'Result is the current scope. 2014-10-20 Robert Dewar <dewar@adacore.com> * par-ch4.adb (P_Expression): Handle extraneous comma/semicolon in middle of expression with logical operators. 2014-10-20 Robert Dewar <dewar@adacore.com> * par-ch13.adb (Possible_Misspelled_Aspect): New function. 2014-10-20 Steve Baird <baird@adacore.com> * pprint.adb: Improve Expression_Image function. From-SVN: r216477
2014-07-31[multiple changes]Arnaud Charlet1-1/+1
2014-07-31 Robert Dewar <dewar@adacore.com> * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends. * par-ch2.adb (P_Pragma): Set Inside_Depends. * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to Check_Unary_Plus_Or_Minus. * scans.ads (Inside_Depends): New flag. * scng.adb (Scan): Pass Inside_Depends to Check_Arrow. * style.ads: Add Inside_Depends parameter to Check_Arrow Add Inside_Depends parameter to Check_Unary_Plus_Or_Minus. * styleg.adb (Check_Arrow): Handle Inside_Depends case. (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case. * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add. Inside_Depends parameter to Check_Unary_Plus_Or_Minus. 2014-07-31 Javier Miranda <miranda@adacore.com> * s-vaflop.adb Move the body of function T_To_G before T_To_D. Required for frontend inlining. * inline.adb (Has_Excluded_Contract): New subprogram used to check if a subprogram inlined by the frontend has contracts which cannot be inlined. 2014-07-31 Bob Duff <duff@adacore.com> * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb: (Call_Chain): Add 1 to number of frames to skip, to account for the fact that there's one more frame on the stack. From-SVN: r213336
2014-07-30[multiple changes]Arnaud Charlet1-0/+1
2014-07-30 Robert Dewar <dewar@adacore.com> * debug.adb: Document that d7 suppresses compilation time output. * errout.adb (Write_Header): Include compilation time in header output. * exp_intr.adb (Expand_Intrinsic_Call): Add Compilation_Date/Compilation_Time (Expand_Source_Info): Expand Compilation_Date/Compilation_Time. * g-souinf.ads (Compilation_Date): New function (Compilation_Time): New function. * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time. * gnat_rm.texi (Compilation_Date): New function (Compilation_Time): New function. * opt.ads (Compilation_Time): New variable. * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function. * sem_intr.adb (Compilation_Date): New function. (Compilation_Time): New function. * snames.ads-tmpl (Name_Compilation_Date): New entry. (Name_Compilation_Time): New entry. 2014-07-30 Yannick Moy <moy@adacore.com> * inline.adb: Add comment. 2014-07-30 Ed Schonberg <schonberg@adacore.com> * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a parameterless attribute, and a postondition can mention an indexed component or a slice whose prefix is an attribute reference F'Result. 2014-07-30 Robert Dewar <dewar@adacore.com> * sprint.adb (Sprint_Node_Actual, case Object_Declaration): Avoid bomb when printing package Standard. 2014-07-30 Ed Schonberg <schonberg@adacore.com> * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration entity is created at this point, ensure that the name of the flag is unique, because the subprogram may be overloaded and other homonyms may also have elaboration flags created on the fly. 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com> * sem_attr.adb (Analyze_Array_Component_Update): New routine. (Analyze_Attribute): Major cleanup of attribute 'Update. The logic is now split into two distinct routines depending on the type of the prefix. The use of <> is now illegal in attribute 'Update. (Analyze_Record_Component_Update): New routine. (Check_Component_Reference): Removed. (Resolve_Attribute): Remove the return statement and ??? comment following the processing for attribute 'Update. As a result, the attribute now freezes its prefix. 2014-07-30 Javier Miranda <miranda@adacore.com> * exp_ch4.adb (Apply_Accessibility_Check): Do not call Base_Address() in VM targets. From-SVN: r213246
2014-07-18[multiple changes]Arnaud Charlet1-0/+10
2014-07-18 Vincent Celier <celier@adacore.com> * par-ch4.adb (Simple_Expression): Add missing style check for binary adding operators. (Term): Add missing style check for multiplying operators. 2014-07-18 Robert Dewar <dewar@adacore.com> * impunit.adb: Minor comment correction. * widechar.adb, s-wchcon.ads: Minor comment corrections. From-SVN: r212783
2014-07-16[multiple changes]Arnaud Charlet1-0/+48
2014-07-16 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb: Minor code reorganization (use Is_Access_Type, not in Access_Kind). * exp_ch3.adb: Minor code reorganization, use Is_Access_Type, not in Access_Kind. * par-ch4.adb (At_Start_Of_Attribute): New function (P_Simple_Expression): Better msg for bad attribute prefix. * scans.ads: Minor reformatting. 2014-07-16 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a static constant, check that in belongs to the corresponding index subtype, to produce the proer warning when expansion is disabled. 2014-07-16 Robert Dewar <dewar@adacore.com> * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment. * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z. * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z * usage.adb: Add lines for -gnatw.z/-gnatw.Z. * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z * warnsw.adb: Set Warn_On_Size_Alignment appropriately. * warnsw.ads (Warn_On_Size_Alignment): New flag Minor reformatting. From-SVN: r212656
2014-05-21[multiple changes]Arnaud Charlet1-8/+8
2014-05-21 Robert Dewar <dewar@adacore.com> * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma Warnings (Off, string). 2014-05-21 Robert Dewar <dewar@adacore.com> * osint.adb: Fix three error messages to say invalid instead of erroneous. * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb, sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb, sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments. 2014-05-21 Ed Schonberg <schonberg@adacore.com> * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb, sem_ch9.ads: Move discriminant manipulation routines for analysis of aspect specifications from sem_ch9 to sem_ch13, where they belong. From-SVN: r210695
2014-01-29a-except-2005.adb, [...]: Minor reformatting.Robert Dewar1-4/+4
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-21[multiple changes]Arnaud Charlet1-65/+104
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
2014-01-21[multiple changes]Arnaud Charlet1-4/+20
2014-01-21 Thomas Quinot <quinot@adacore.com> * gnat_rm.texi (Scalar_Storage_Order): Update documentation. 2014-01-21 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve the value of Assertions_Enabled flag when compiling an instance of an internal unit. This facilitates the use of pre/postconditions in generic internal units, such as the new elementary function libraries. 2014-01-21 Robert Dewar <dewar@adacore.com> * exp_aggr.adb: Minor reformatting. * sem_attr.adb: Minor reformatting. * sem_res.adb: Minor comment addition. * einfo.adb: Minor comment updates. * freeze.adb: Minor reformatting and code reorganization. 2014-01-21 Ed Schonberg <schonberg@adacore.com> * par-ch4.adb (P_If_Expression): Handle more gracefully an elsif clause that does not have an else part. From-SVN: r206891
2014-01-20[multiple changes]Arnaud Charlet1-1/+3
2014-01-20 Robert Dewar <dewar@adacore.com> * errout.ads, errout.adb: Implement >? >x? >X? sequences in error messages. * sem_ch6.adb (Check_Statement_Sequence): Missing return is an error in GNATprove mode. 2014-01-20 Ed Schonberg <schonberg@adacore.com> * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute reference 'Old takes no parameters, and thus can appear as a prefix of a slice. 2014-01-20 Eric Botcazou <ebotcazou@adacore.com> * exp_aggr.adb: Fix minor typos. From-SVN: r206839
2013-10-15[multiple changes]Arnaud Charlet1-0/+8
2013-10-15 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Constituent): When a state acts as a constituent of another state, ensure that the said state has a Part_Of dependency in its corresponding aspect/pragma Abstract_State. 2013-10-15 Robert Dewar <dewar@adacore.com> * par-ch4.adb (P_If_expression): Handle redundant ELSE cleanly. 2013-10-15 Thomas Quinot <quinot@adacore.com> * atree.ads (New_Copy, Relocate_Node): Improve documentation (note that these subprograms reset Is_Overloaded). 2013-10-15 Thomas Quinot <quinot@adacore.com> * checks.adb (Check_Needed): Handle the case where the test in the left operand of the short circuit is wrapped in a qualified expression, type conversion, or expression with actions. 2013-10-15 Thomas Quinot <quinot@adacore.com> * sem_type.adb, sem_type.ads (Save_Interps): Also propagate Is_Overloaded to New_N, for consistency. 2013-10-15 Ed Schonberg <schonberg@adacore.com> * a-tienau.adb (Put): Use file parameter to query values of current column and line length. From-SVN: r203595
2013-09-10[multiple changes]Arnaud Charlet1-31/+7
2013-09-10 Robert Dewar <dewar@adacore.com> * sinput.adb (Check_For_BOM): Avoid reading past end of file. 2013-09-10 Robert Dewar <dewar@adacore.com> * errout.adb (Error_Msg_Ada_2012_Feature): New procedure. * errout.ads (Error_Msg_Ada_2012_Feature): New procedure. * inline.ads: Save/Restore Ada_Version_Pragma. * opt.adb: Save/Restore Ada_Version_Pragma. * opt.ads (Ada_Version_Pragma): New variable. * par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature. * prj.adb: Initialize Ada_Version_Pragma. * sem_attr.adb: Use Error_Msg_Ada_2012_Feature. * sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma. * sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma. * switch-c.adb: Initialize Ada_Version_Pragma. * sem_ch12.adb: Minor reformatting. 2013-09-10 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Process_Subtype): Discard constraint on access to class-wide type. Such constraints are not supported and are considered a language pathology. From-SVN: r202466
2013-07-08[multiple changes]Arnaud Charlet1-15/+46
2013-07-08 Robert Dewar <dewar@adacore.com> * sem.ads: Minor comment updates. * s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb: Minor reformatting. 2013-07-08 Robert Dewar <dewar@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry for Restriction_Set. * gnat_rm.texi: Add missing menu entry for Attribute Ref Add documentation for attribute Restriction_Set. * lib-writ.adb (Write_With_Lines): Generate special W lines for Restriction_Set. * lib-writ.ads: Document special use of W lines for Restriction_Set. * lib.ads (Restriction_Set_Dependences): New table. * par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to list (Scan_Name_Extension_Apostrophe): Remove kludge test for Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence for Restricton_Set. * restrict.adb (Check_SPARK_Restriction): Put in Alfa order (OK_No_Dependence_Unit_Name): New function. * restrict.ads (OK_No_Dependence_Unit_Name): New function. * rtsfind.adb: Minor reformatting Minor code reorganization. * sem_attr.adb (Analyze_Attribute): Add processing for Restriction_Set. * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Remove Check_Unit_Name and use new function OK_No_Dependence_Unit_Name instead. * sinfo.ads: Minor comment updates. * snames.ads-tmpl: Add entry for Restriction_Set attribute. 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Apply_Accessibility_Check): Remove local constant Pool_Id and local variable Free_Stmt. Do not deallocate the faulty object as "free" is not available on all targets/profiles. 2013-07-08 Robert Dewar <dewar@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Storage_Size aspect for task type in case discriminant is referenced. (Analyze_Attribute_Definition_Clause): Do not flag Storage_Size attribute definition clause as obsolescent if from aspect. From-SVN: r200771
2013-04-24[multiple changes]Arnaud Charlet1-14/+5
2013-04-24 Ed Schonberg <schonberg@adacore.com> * sem_ch7.adb (Swap_Private_Dependents): New internal routine to Install_Private_Declarations, to make the installation of private dependents recursive in the presence of child units. * sem_ch3.adb (Build_Discriminated_Subtype): Initialize properly the Private_Dependents of a private subtype. 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the retrieval of the block declarations. * par-ch4.adb (P_Name): Let the name parsing machinery create a sequence of nested indexed components for attribute Loop_Entry. * sem_attr.adb (Analyze_Attribute): Add local constant Context. Reimplement part of the analysis of attribute Loop_Entry. (Convert_To_Indexed_Component): Removed. * sem_ch4.adb (Analyze_Indexed_Component_Form): Do not analyze an indexed component after it has been rewritten into attribute Loop_Entry. From-SVN: r198240
2013-04-242013-04-24 Sergey Rybin <rybin@adacore.com frybin>Arnaud Charlet1-6/+25
* gnat_ugn.texi: Add description of '--help' and '--version' options for ASIS tools: gnatelim, gnatmetric, gnatstub, gnatpp. 2013-04-24 Arnaud Charlet <charlet@adacore.com> * gnat_rm.texi: Minor syntax fix. 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_Loop_Entry_Attribute): Add extra comments on what and why is being analyzed. Remove the decoration of renamings as this simply falls out of the general analysis mechanism. 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com> * sem_res.adb (Explain_Redundancy): New routine. (Resolve_Equality_Op): Place the error concerning a redundant comparison to True at the "=". Try to explain the nature of the redundant True. 2013-04-24 Javier Miranda <miranda@adacore.com> * checks.adb, exp_ch6.adb (Install_Null_Excluding_Check): No check in interface thunks since it is performed at the caller side. (Expand_Simple_Function_Return): No accessibility check needed in thunks since the check is done by the target routine. 2013-04-24 Vincent Celier <celier@adacore.com> * xref_lib.adb (Add_Entity): Use the canonical file names so that source file names with capital letters are found on platforms where file names are case insensitive. 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com> * par-ch4.adb (P_Name): Continue to parse the name extension when the construct is attribute Loop_Entry. Do not convert the attribute reference into an indexed component when there is at least one expression / range following 'Loop_Entry. 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch6.adb (Contains_Enabled_Pragmas): New routine. (Process_PPCs): Generate procedure _Postconditions only when the context has invariants or predicates or enabled aspects/pragmas. From-SVN: r198236
2013-04-11exp_ch11.ads, [...] (Expand_N_Raise_Expression): New procedure.Robert Dewar1-1/+13
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-12-05[multiple changes]Arnaud Charlet1-5/+3
2012-12-05 Robert Dewar <dewar@adacore.com> * atree.ads, par-ch4.adb, sem_attr.adb, sem_ch13.adb: Minor reformatting. 2012-12-05 Eric Botcazou <ebotcazou@adacore.com> * gnat_ugn.texi (Switches for gcc): Document -flto and reorder. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * par-ch5.adb (P_Condition): Handle properly Ada 2012 expressions that must be parenthesized before checking for redundant parentheses when that check is enabled. From-SVN: r194210
2012-12-05[multiple changes]Arnaud Charlet1-0/+12
2012-12-05 Ed Schonberg <schonberg@adacore.com> * par-ch4.adb (P_Allocator): In Ada 2012 (AI05-0104) an uninitialized allocator cannot carry an explicit not null indicator. * sem_ch4.adb (Analyze_Allocator): Remove code that implements the check for AI05-0104, the check is syntactic and performed in the parser. 2012-12-05 Geert Bosch <bosch@adacore.com> * sem_attr.adb (Analyze_Attribute): Use base type for floating point attributes. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications, Ahalyze_Aspect_Default_Value): For a scalar type attach default value to base type as well, because it is a type-specific aspect even though it can be specified on a first subtype. From-SVN: r194209
2012-12-05[multiple changes]Arnaud Charlet1-16/+26
2012-12-05 Yannick Moy <moy@adacore.com> * urealp.ads: Minor rewording. 2012-12-05 Yannick Moy <moy@adacore.com> * aspects.ads (No_Duplicates_Allowed): Forbid use of duplicate Contract_Cases aspects. * sem_prag.adb (Analyze_Pragma/Pragma_Contract_Case): Rename POST_CASE into CONTRACT_CASE in both grammar and code, to be consistent with current language definition. Issue a more precise error message when the pragma duplicates another pragma or aspect. 2012-12-05 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Add processing for attribute Update. (Expand_Update_Attribute): New routine. * par-ch4.adb (P_Name): The sole expression of attribute Update is an aggregate, parse it accordingly. * sem_attr.adb (Analyze_Attribute): Verify the legality of attribute Update. (Eval_Attribute): Attribute Update does not need evaluation because it is never static. * snames.ads-tmpl: Add Name_Update to the list of special names recognized by the compiler. Add an Attribute_Id for Update. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * exp_util.adb (Remove_Side_Effects): For purposes of removing side effects, qualified expressions do not receive a special treatment, even though in Ada 2012 they are defined as object references. 2012-12-05 Thomas Quinot <quinot@adacore.com> * par-ch3.adb: Minor reformatting. From-SVN: r194207
2012-12-05[multiple changes]Arnaud Charlet1-0/+7
2012-12-05 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_N_Assignment_Statement): Handle properly the generation of discriminant checks when the left-hand side has a type with hidden discriminants. * sem_ch3.ads (Is_Visible_Component): Add defaulted parameter to specify the node on which component visibility is being checked. * sem_ch3.adb (Is_Visible_Component): Use new parameter to determine whether the reference comes from a type conversion to a full view of a private type with unknown discriminants. * sem_ch4.adb (Analyze_Selected_Component): Call Is_Visible_Component with added parameter. 2012-12-05 Arnaud Charlet <charlet@adacore.com> * make.adb: Minor comment update. 2012-12-05 Arnaud Charlet <charlet@adacore.com> * gnatlink.adb: Also use -x adascil in CodePeer mode when calling gcc. * exp_ch5.adb: Minor reformatting. 2012-12-05 Bob Duff <duff@adacore.com> * exp_ch4.adb: Minor comment. 2012-12-05 Bob Duff <duff@adacore.com> * par-ch4.adb: Set Paren_Count correctly for a parenthesized expression containing a conditional expression or quantified expression. * sprint.adb: Update comment. 2012-12-05 Bob Duff <duff@adacore.com> * style.adb, scans.ads, styleg.adb: Update comments. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Find_Selected_Component): Handle properly an expanded name whose prefix is the expanded name of an enclosing entry, that is to say a construct such as T.E.X, where T is an enclosing concurrent type and E is an enclosing entry. From-SVN: r194204
2012-11-06[multiple changes]Arnaud Charlet1-5/+6
2012-11-06 Robert Dewar <dewar@adacore.com> * exp_prag.adb, impunit.adb, exp_ch9.adb, par-ch4.adb, s-tarest.adb: Minor reformatting. 2012-11-06 Tristan Gingold <gingold@adacore.com> * s-tposen.ads: Minor comment update. 2012-11-06 Arnaud Charlet <charlet@adacore.com> * sysdep.c: Rename sig* wrappers to use unique names. 2012-11-06 Yannick Moy <moy@adacore.com> * exp_dbug.adb (Qualify_Entity_Name): Mark entity as having a qualified name after being treated, in formal verification mode. 2012-11-06 Fedor Rybin <frybin@adacore.com> * gnat_ugn.texi: Updating gnattest section to reflect changes in default behaviour of the tool. From-SVN: r193215
2012-11-06[multiple changes]Arnaud Charlet1-8/+30
2012-11-06 Thomas Quinot <quinot@adacore.com> * s-oscons-tmplt.c: Interfaces.C now needs to be WITH'd even on platforms that do not support sockets (for the benefit of subtype IOCTL_Req_T). 2012-11-06 Ed Schonberg <schonberg@adacore.com> * par-ch4.adb (P_Primary): if-expressions, case-expressions, and quantified expressions are legal if surrounded by parentheses from an enclosing context, such as a call or an instantiation. 2012-11-06 Yannick Moy <moy@adacore.com> * impunit.adb (Get_Kind_Of_Unit): Return appropriate kind for predefined implementation files, instead of returning Not_Predefined_Unit on all .adb files. 2012-11-06 Tristan Gingold <gingold@adacore.com> * exp_ch9.adb (Build_Activation_Chain_Entity): Return immediately if partition elaboration policy is sequential. (Build_Task_Activation_Call): Likewise. Use Activate_Restricted_Tasks on restricted profile. (Make_Task_Create_Call): Do not use the _Chain parameter if elaboration policy is sequential. Call Create_Restricted_Task_Sequential in that case. * exp_ch3.adb (Build_Initialization_Call): Change condition to support concurrent elaboration policy. (Build_Record_Init_Proc): Likewise. (Init_Formals): Likewise. * bindgen.adb (Gen_Adainit): Declare Partition_Elaboration_Policy and set it in generated code if the elaboration policy is sequential. The procedure called to activate all tasks is now named __gnat_activate_all_tasks. * rtsfind.adb (RE_Activate_Restricted_Task, RE_Create_Restricted_Task_Sequential): New RE_Id literals. * s-tarest.adb (Create_Restricted_Task): Added to create a task without adding it on an activation chain. (Activate_Tasks): Has now a Chain parameter. (Activate_All_Tasks_Sequential): Added. Called by the binder to activate all tasks. (Activate_Restricted_Tasks): Added. Called during elaboration to activate tasks of the units. * s-tarest.ads: Remove pragma Partition_Elaboration_Policy. (Partition_Elaboration_Policy): New variable (set by the binder). (Create_Restricted_Task): Revert removal of the chain parameter. (Create_Restricted_Task_Sequential): New procedure. (Activate_Restricted_Tasks): Revert removal. (Activate_All_Tasks_Sequential): New procedure. From-SVN: r193214
2012-10-29[multiple changes]Arnaud Charlet1-1/+9
2012-10-29 Thomas Quinot <quinot@adacore.com> * sem_elab.adb: Minor reformatting and code reorganization. 2012-10-29 Robert Dewar <dewar@adacore.com> * par-ch4.adb (P_Primary): Warn on bad use of unary minus. 2012-10-29 Robert Dewar <dewar@adacore.com> * s-valuti.ads, s-valuti.adb (Bad_Value): New procedure. * s-valllu.adb, s-valwch.adb, s-valcha.adb, s-valint.adb, s-valuns.adb, s-valrea.adb, s-valboo.adb, s-valenu.adb, s-vallli.adb: Use Bad_Value everywhere. 2012-10-29 Yannick Moy <moy@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Do not suppress checks in Alfa mode. From-SVN: r192915
2012-10-02par_sco.adb, [...]: Change name Conditional_Expression to If_Expression.Robert Dewar1-37/+33
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-10-02exp_ch7.adb, [...]: Minor reformatting.Robert Dewar1-0/+9
2012-10-02 Robert Dewar <dewar@adacore.com> * exp_ch7.adb, sem_dim.adb, sem_dim.ads, prj-part.adb, checks.adb, freeze.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting. 2012-10-02 Robert Dewar <dewar@adacore.com> * sem_prag.adb (Analyze_Pragma, case Overflow_Checks): Fix typo preventing proper processing of Overflow_Checks pragmas for general case. 2012-10-02 Robert Dewar <dewar@adacore.com> * exp_ch4.adb (Expand_N_Op_Mod): Fix crash in ELIMINATED overflow checks mode when bignum mode is used. 2012-10-02 Robert Dewar <dewar@adacore.com> * stylesw.ads, gnat_ugn.texi: Document new style rule for NOT IN. * par-ch4.adb (P_Relational_Operator): Add style check for NOT IN. * style.ads, styleg.adb, styleg.ads (Check_Not_In): New procedure. From-SVN: r191962
2012-07-09[multiple changes]Arnaud Charlet1-7/+1
2012-07-09 Vincent Pucci <pucci@adacore.com> * sem_ch9.adb (Check_Node): Allow attributes that denote static function for lock-free implementation. (Is_Static_Function): New routine. 2012-07-09 Tristan Gingold <gingold@adacore.com> * tracebak.c: Adjust skip_frames on Win64. 2012-07-09 Tristan Gingold <gingold@adacore.com> * init.c: Add __gnat_adjust_context_for_raise for ia64/hpux. * raise-gcc.c: __gnat_cleanupunwind_handler: Do not call _Unwind_GetGR on hpux when using libgcc unwinder. Part of 2012-07-09 Vincent Pucci <pucci@adacore.com> * exp_attr.adb, sem_attr.adb: Minor reformatting. * par-ch13.adb, par-ch4.adb, par-util.adb: Reformatting considering that internal attribute names are not defined anymore in the main attribute names list. * snames.adb-tmpl (Get_Attribute_Id): Special processinf for names CPU, Dispatching_Domain and Interrupt_Priority. (Is_Internal_Attribute_Name): Minor reformatting. * snames.ads-tmpl: New list of internal attribute names. Internal attributes moved at the end of the attribute Id list. From-SVN: r189380
2012-07-09[multiple changes]Arnaud Charlet1-1/+2
2012-07-09 Robert Dewar <dewar@adacore.com> * freeze.adb: Minor code reorganization (use Ekind_In). * exp_attr.adb, sem_ch9.adb par-ch4.adb, s-taprop-mingw.adb, sem_attr.adb, exp_ch8.adb, snames.adb-tmpl, par-util.adb, sem_ch13.adb, snames.ads-tmpl: Minor reformatting. 2012-07-09 Tristan Gingold <gingold@adacore.com> * raise-gcc.c: Adjust previous patch. 2012-07-09 Vincent Celier <celier@adacore.com> * make.adb (Compilation_Phase): Do not build libraries in Codepeer mode (do not call Library_Phase). From-SVN: r189379
2012-07-09[multiple changes]Arnaud Charlet1-1/+6
2012-07-09 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb: Extend previous change to elementary types. 2012-07-09 Javier Miranda <miranda@adacore.com> * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): Reverse previous patch since unconditionally handling as renaming_as_body renamings of predefined dispatching equality and unequality operator cause visibility problems with private overridings of the equality operator (see ACATS C854001). 2012-07-09 Vincent Pucci <pucci@adacore.com> * exp_attr.adb (Signal_Bad_Attribute): Raise Program_Error in case of internal attribute names (already rejected by the parser). * par-ch13.adb (P_Representation_Clause): Complain if an internal attribute name that comes from source occurs. * par-ch4.adb (P_Name): Complain if an internal attribute name occurs in the context of an attribute reference. * par-util.adb (Signal_Bad_Attribute): Don't complain about mispelling attribute with internal attributes. * sem_attr.adb (Analyze_Attribute): Raise Program_Error in case of internal attribute names (already rejected by the parser). * snames.adb-tmpl (Is_Internal_Attribute_Name): New routine. * snames.ads-tmpl: Attributes CPU, Dispatching_Domain and Interrupt_Priority are marked as INT attributes since they don't denote real attribute and are only used internally in the compiler. (Is_Internal_Attribute_Name): New routine. From-SVN: r189378
2012-03-19[multiple changes]Arnaud Charlet1-1/+20
2012-03-19 Yannick Moy <moy@adacore.com> * sem_ch6.adb: Minor code clean up. 2012-03-19 Vincent Celier <celier@adacore.com> * make.adb (Scan_Make_Arg): Make sure all significant -m switches on the command line are counted. 2012-03-19 Robert Dewar <dewar@adacore.com> * sem_elab.adb (Generate_Elab_Warnings): Fix spec, fix attribute reference case 2012-03-19 Robert Dewar <dewar@adacore.com> * par-ch4.adb (Check_Bad_Exp): New procedure 2012-03-19 Robert Dewar <dewar@adacore.com> * exp_attr.adb, sem_attr.adb, sem_attr.ads, snames.ads-tmpl: Add initial framework for Valid_Scalars attribute. 2012-03-19 Robert Dewar <dewar@adacore.com> * scng.adb (Scan): Recognize incorrect preprocessor directive 2012-03-19 Robert Dewar <dewar@adacore.com> * atree.adb (Allocate_Initialize_Node): Use Num_Extension_Nodes * atree.ads (Num_Extension_Nodes): New variable * debug.adb: New debug flag -gnatd.N * gnat1drv.adb (Adjust_Global_Switches): Adjust Num_Extension_Nodes if -gnatd.N set 2012-03-19 Eric Botcazou <ebotcazou@adacore.com> * einfo.ads: Minor update to First_Rep_Item and Has_Gigi_Rep_Item descriptions. 2012-03-19 Robert Dewar <dewar@adacore.com> * opt.ads: Remove HLO_Active flag. * sem.adb: Remove call of high level optimizer. * sem.ads (New_Nodes_OK): Removed. * sem_ch10.adb: Remove references to New_Nodes_OK. * switch-c.adb: Remove handling of -gnatH switch. From-SVN: r185528
2011-11-21[multiple changes]Arnaud Charlet1-0/+5
2011-11-21 Robert Dewar <dewar@adacore.com> * sinput.ads: Minor comment fix. 2011-11-21 Robert Dewar <dewar@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit, Last_Bit, Position): Handle 2005 case. 2011-11-21 Robert Dewar <dewar@adacore.com> * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access to deal with fact that we properly detect the error if Access is used. (Increment): Same fix. * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access to deal with fact that we properly detect the error if Access is used. * sem_util.adb (Is_Volatile_Object): Properly record that A.B is volatile if the B component is volatile. This affects the check for passing such a by reference volatile actual to a non-volatile formal (which should be illegal) 2011-11-21 Robert Dewar <dewar@adacore.com> * freeze.adb (Freeze_Enumeration_Type): Make sure to set both size and alignment for foreign convention enumeration types. * layout.adb (Set_Elem_Alignment): Redo setting of alignment when size is set. 2011-11-21 Yannick Moy <moy@adacore.com> * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check, Apply_Discriminant_Check, Apply_Divide_Check, Apply_Selected_Length_Checks, Apply_Selected_Range_Checks, Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks, Selected_Range_Checks): Replace reference to Expander_Active with reference to Full_Expander_Active, so that expansion of checks is not performed in Alfa mode 2011-11-21 Tristan Gingold <gingold@adacore.com> * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with fact that we properly detect the error if Access is used. 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com> * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check. 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com> * exp_imgv.adb: Add with and use clause for Errout. (Expand_Width_Attribute): Emit a warning when in configurable run-time mode to provide a better diagnostic message. 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com> * s-finmas.adb (Finalize): Add comment concerning double finalization. 2011-11-21 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Access_Definition): If the access definition is itself the return type of an access to function definition which is ultimately the return type of an access to subprogram declaration, its scope is the enclosing scope of the ultimate access to subprogram. 2011-11-21 Steve Baird <baird@adacore.com> * sem_res.adb (Valid_Conversion): If a conversion was legal in the body of a generic, then the corresponding conversion is legal in the expanded body of an instance of the generic. From-SVN: r181568
2011-08-30[multiple changes]Arnaud Charlet1-17/+73
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-29[multiple changes]Arnaud Charlet1-20/+4
2011-08-29 Robert Dewar <dewar@adacore.com> * sem_ch8.adb: Minor reformatting. 2011-08-29 Bob Duff <duff@adacore.com> * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012. * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for treating "some" as unreserved in earlier Ada versions. This is now handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some, rather than Name_Some, since Tok_Some is now recognized as reserved. * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other reserved word. * scans.ads: Minor comment fixes. * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as for other language versions. * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for treating "some" as unreserved in earlier Ada versions. This is now handled in Snames.Is_Keyword_Name. * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in Ada 2012. (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as unreserved in earlier Ada versions. This is now handled in Snames.Is_Keyword_Name. * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved words as for other language versions. * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to Ada 2012, not just Ada 2005. From-SVN: r178191